bmad-module-builder
Audited by Socket on Sep 15, 2026
3 alerts found:
Anomalyx2SecurityThe code implements a CSV merge and legacy-file cleanup utility with no clear malware indicators. However, --module-code is unsanitized before being used in a deletion path, allowing path traversal and potentially unintended deletion of files named module-help.csv. Validate that the module code is a safe single directory name and ensure the resolved deletion path remains beneath the intended legacy directory. The fragment is also syntactically incomplete as displayed.
The code is not evidently malware and contains no network exfiltration, backdoor, or obfuscated payload. However, it performs recursive deletion using unsanitized user-controlled paths. Path traversal or absolute directory arguments can delete files outside the intended _bmad/ directory, potentially including highly sensitive system or project data when run with sufficient privileges. Directory-name validation and containment checks using resolved paths are required before use of shutil.rmtree(). The provided fragment also appears syntactically incomplete.
This is a local scaffolding utility that copies a template and injects module-specific files. It does not show evidence of malware or data exfiltration. However, the unvalidated module_code is used in a filesystem path, and an existing resulting path is recursively removed. A malicious or accidental module_code containing traversal sequences could cause deletion or replacement outside the requested target directory. Enforce a strict module-code allowlist such as [A-Za-z0-9_-] with the documented length, resolve the destination, and verify it remains beneath target_dir before deletion or copying. If the shown missing closing parenthesis is part of the actual file, the code is syntactically invalid.