running-code-analyzer
Pass
Audited by Gen Agent Trust Hub on Jul 29, 2026
Risk Level: SAFECOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The skill uses the
Bashtool to executesf code-analyzer,git, and local Node.js scripts. InSKILL.md(Step 1.4), the instructions direct the agent to interpolate user-provided keywords directly into a shell command:sf code-analyzer rules --rule-selector all 2>&1 | grep -i "USER_KEYWORD". This pattern creates a potential command injection surface if the agent fails to properly escape the user's input before execution. - [COMMAND_EXECUTION]: The skill implements a code-fixing workflow via
scripts/apply-fixes.js. This script reads file paths and replacement code from a JSON result file and performs in-place writes to the local filesystem usingfs.writeFileSync. While the tool asks for user confirmation, the script itself does not perform path sanitization (e.g., checking for path traversal like../../) on the file paths provided in the (potentially untrusted) scan results. - [PROMPT_INJECTION]: The
SKILL.mdfile contains strong instructional overrides using critical warnings to steer the agent's tool selection. It explicitly commands the agent to ignore specific MCP tools (run_code_analyzer,mcp__*) in favor of theBashtool. While intended for functional stability, these instructions represent a deliberate override of the agent's default tool discovery and invocation logic. - [PROMPT_INJECTION]: The skill is susceptible to indirect prompt injection via the scan results it processes (Category 8).
- Ingestion points: The
results.jsonfile generated bysf code-analyzer(which scans untrusted project code) is ingested by the parsing and fixing scripts. - Boundary markers: None; the scripts parse the JSON structure directly without delimiters or validation of the content's origin.
- Capability inventory: The skill has the capability to write to the filesystem via
scripts/apply-fixes.js. - Sanitization: Absent; the
apply-fixes.jsscript uses thefilepath from the JSON object to perform writes without validating that the path remains within the expected project workspace.
Audit Metadata