skills/trailofbits/skills/semgrep/Gen Agent Trust Hub

semgrep

Pass

Audited by Gen Agent Trust Hub on Sep 17, 2026

Risk Level: SAFEEXTERNAL_DOWNLOADSCOMMAND_EXECUTIONDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • [EXTERNAL_DOWNLOADS]: The skill clones third-party Semgrep rulesets from various GitHub repositories, including those maintained by security consulting firms and researchers. This is a core feature for expanding security coverage beyond default rules.
  • The skill requires a "HARD GATE" user approval (Step 3) before any rulesets are cloned or scans are executed.
  • URLs are validated via regex in the shell script to ensure they are legitimate HTTPS git repositories.
  • [COMMAND_EXECUTION]: The skill executes the Semgrep CLI and associated shell scripts (run-scans.sh) to perform analysis.
  • A dedicated function has_unsafe_char is used to sanitize target and output paths, rejecting any inputs containing shell-active characters like backticks, dollar signs, or quotes.
  • Telemetry is explicitly disabled using the --metrics=off flag on every semgrep invocation to prevent data leakage.
  • [DYNAMIC_EXECUTION]: The skill uses uv run to execute a local Python script (merge_sarif.py) for consolidating scan results.
  • The script is executed without project dependencies (--no-project) and performs file-based merging without shelling out to external tools.
  • [INDIRECT_PROMPT_INJECTION]: As a static analysis tool, the skill ingests and processes untrusted codebases. This represents an indirect prompt injection surface.
  • Ingestion points: The codebase target directory is read by the Semgrep engine.
  • Boundary markers: The scan results are written to a dedicated output directory and are not directly interpolated into the agent's system instructions.
  • Capability inventory: The skill has capabilities for network access (via git clone), file system modification (within the output directory), and subprocess execution.
  • Sanitization: Shell injection protection is implemented for all user-supplied paths, and downloaded rule files are pruned to remove non-rule YAML content that might cause scanner instability.
Audit Metadata
Risk Level
SAFE
Analyzed
Sep 17, 2026, 08:41 PM
Security Audit — agent-trust-hub — semgrep