skills
bmad-code-org/BMAD-METHOD/skills
- Type
- Skill
- Scanned
- Nov 13, 2026
- Version
- e435a22574fe
- Files read
- 542
This project provides the BMad Method collection of AI agent skills, role personas, and helper scripts for planning, designing, building, reviewing, and testing software. Its biggest risk is that these skills automatically run scripts and custom instructions stored inside the project folder being inspected, meaning simply reviewing an untrusted code repository or pull request can run malicious code on your computer.
What it can reach
- Files
- Reads and writes files in your project folder (such as code, settings, planning docs, tickets, and reports), as well as user templates in ~/.bmad/, installed skill folders, and Claude chat logs in ~/.claude/projects/.
- Shell commands
- Runs local Python scripts, Git and GitHub commands, package installers (uv and npx) to download dependencies or skills, file openers, and background AI command-line tools with permission prompts turned off during skill tests.
- Network
- Performs web searches, downloads software packages, fetches templates and files from GitHub or external links, connects to optional project trackers (like GitHub, Jira, Linear, Notion, and Trello), and loads display scripts from the internet when viewing HTML reports.
- Secrets
- Copies or links configured login files and system keychains from your home folder and forwards environment variables like API keys into temporary test environments when evaluating skills.
- Browser
- Opens locally generated HTML pages, including brainstorming tools, design mockups, reports, and formatted documents, in your default web browser.
Findings
-
HighSkills execute repository-controlled Python scripts from
_bmad/scripts/during code reviewsskills/method/bmad-code-review/SKILL.md:17
Skills locate
{project-root}by walking up from the working directory for_bmad/and immediately run Python scripts such asrender_skill.pyandresolve_customization.pyfrom{project-root}/_bmad/scripts/, which is tracked in git. Even whenbmad-code-reviewis run inno-codeinspection-only mode or by a CI bot on a checked-out pull request or cloned third-party repository, a stranger who modifies_bmad/scripts/render_skill.py(or adds workflow hooks in_bmad/custom/) gets arbitrary code or prompt execution before the review starts.Fix: Run
render_skill.py,resolve_customization.py, andresolve_config.pyfrom the trusted installed skill directory ({skill-root}) rather than{project-root}/_bmad/scripts/, and ignore repository-committed executable hooks when reviewing untrusted branches. -
HighPath traversal via
SKILL.mdname escapes thebmad-evalclean room and writes files on the hostskills/toolsmith/bmad-eval/scripts/run_triggers.py:99
parse_skill_md()reads thenamefield from the target skill'sSKILL.mdfrontmatter without sanitizing path separators or..segments, and passes it directly intoskills_dir / clean_nameandmake_run_dir(). Evaluating a downloaded or third-party skill whoseSKILL.mdcontains../segments innamewrites syntheticSKILL.mdfiles (with attacker-controlled body text fromdescription) and JSON artifacts outside the temporary clean room—potentially directly into the user's real~/.claude/skills/or~/.agents/skills/folder—before any harness sandbox runs.Fix: Pass
skill_namethroughsafe_name()and verify bothskills_dir / clean_nameandoutput_dir / run_idwithcontained()before creating directories or writing files. -
MediumSymlinked fixtures and skill files in
run_evals.pycopy arbitrary host files into the eval workspaceskills/toolsmith/bmad-eval/scripts/run_evals.py:147
When staging an evaluated skill and its
cases.jsonfixtures on the host,resolve_fixtures()resolves relative paths with.resolve()without checking that the resolved target stays insideproject_rootorcases_dir, andstage_skill()callsshutil.copytree()withsymlinks=False. If a user evaluates an untrusted skill repository containing symlinks (for example pointing to~/.ssh/id_rsaor cloud credentials), host-side staging copies those secret files into the clean-roomcwd/and saved run artifacts, defeating any sandbox wrapped aroundharness.command.Fix: Verify that every resolved fixture path is
is_relative_to()project_rootorcases_dir, and refuse symlinks (or verify symlink targets stay insideskill_path) when copying the skill. -
MediumHTML entity bypass in
render_view.pyURL filter allowsjavascript:links in rendered HTML viewsskills/core-tools/bmad-facilitate/scripts/render_view.py:235
harden()checks link and image URLs withunsafeUrl(href)on the raw token string beforemarked@12.0.2emits<a href="...">and inserts it via.innerHTML. Becausemarkeddoes not decode HTML character references in link destinations andencodeURI()leaves&,#, and;intact, a markdown link such as[link](javascript:alert(1))or[link](javascript:alert(1))from external research or imported content bypassesunsafeUrl()and is decoded by the browser's HTML parser into an activejavascript:link on afile://page.Fix: Replace the raw-string scheme blocklist with post-render DOM sanitization that inspects parsed
a.protocolandimg.srcvalues and permits onlyhttp:,https:,mailto:, and relative references. -
LowRendered HTML document views load remote CDN scripts without Subresource Integrity
skills/core-tools/bmad-facilitate/scripts/render_view.py:483
HTML views generated for PRFAQs, briefs, pitch decks, board packs, and investor updates dynamically inject
<script>tags fromhttps://cdn.jsdelivr.netformarked@12.0.2andmermaid@10.9.1withoutintegrityhashes. Opening a local HTML document makes outbound requests to jsDelivr and trusts the CDN response without cryptographic verification in thefile://origin.Fix: Set pinned
s.integrity(sha384-...) ands.crossOrigin = "anonymous"on the dynamically created<script>elements, or bundle the libraries locally so views are truly offline and self-contained. -
LowSetup and update workflows run unpinned
npx skillscommands with-yskills/core-tools/bmad/references/setup.md:5
The setup instructions tell the agent to run
npx skillscommands automatically with-y, includingnpx skills update -p -yandnpx skills add <owner>/<repo>. Using-ywith an unpinned npm package name downloads and executes whatever version ofskillsis currently latest on npm without confirmation, andinstall_command()defaults to unpinnedmainbranches unless the user already pinned a tag.Fix: Pin a specific version of the
skillsCLI package (such asnpx skills@<version>) and require explicit user confirmation of the package, repository, and git ref before running install or update commands.
