← Explore all skills

SECURITY / trailofbits

Semgrep Repository Scan

Plan and execute language-scoped Semgrep scans with explicit partial, failed and uncovered scan states.

“Plan and execute language-scoped Semgrep scans with explicit partial, failed and uncovered scan states.”

01 / THE REASONING

Why this made the selection.

  • The scan skill treats the user's request to scan as not enough approval, and run-scans.sh is what puts --metrics=off on every generated command.
  • The separate slash-command workflow is documented as skipping that approval gate because the scan does not use --autofix.
  • The inspected helper constructs argument arrays, forces metrics off, records target byte limits and counts files actually scanned.
  • Combine selected registry and third-party rulesets with bounded language scope

02 / THE REVIEW RECORD

What we actually inspected.

Source review has boundaries.
A clear record is more useful than a “safe” badge.

Material inspected

  • plugins/static-analysis/skills/semgrep/SKILL.md
  • plugins/static-analysis/skills/semgrep/scripts/run-scans.sh
  • plugins/static-analysis/skills/semgrep/workflows/scan-workflow.md
  • LICENSE
  • README.md

Our findings

  • Semgrep phones home unless --metrics=off is set. The script hard-codes that flag and also clones third-party rule repositories into the output directory.
  • The interactive skill requires an explicit yes after the plan. The original request, silence, and questions are listed as not approval. The /static-analysis:semgrep-scan workflow does not stop for that gate.
  • It does not autofix. OSS mode does not track taint across files, and a ruleset whose clone or scan failed has to be reported rather than omitted.
  • The inspected helper constructs argument arrays, forces metrics off, records target byte limits and counts files actually scanned.
  • Its status logic distinguishes missing artifacts, partial compilation and known-zero file coverage; selected helper branches were reviewed without running scans.

Not established by this review

  • The resource was not executed and its tools were not called.
  • Semgrep was not installed or run, and no ruleset repository was cloned.
  • No skill execution, authenticated service operation, or outcome benchmark was performed.

The review applies to the material and revision named here. A newer upstream release can change its behavior.

03 / PUT IT TO WORK

Add a skill to your workflow.

Upstream setup instructions ↗
  1. Check out trailofbits/skills at 8e54050ae63c2f62224c35b1616efe71865b4777 and install the complete static-analysis plugin through the publisher-supported host workflow, retaining sibling agents, workflows, scripts and references.
  2. Install Semgrep, jq and git; review proposed languages, rulesets and scope before running.
  3. Keep scans.json with JSON/SARIF outputs and pass scan status to the merge step; metrics are disabled and autofix is outside this workflow.

Before you start

  • Semgrep
  • jq, git and bash
  • A dedicated output directory

04 / FOLLOW THE EVIDENCE

The source trail.

Our notes are separate from the original resource.
Check upstream before adopting a new version.

  1. Pinned skill definition ↗Checked

    https://github.com/trailofbits/skills/blob/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/static-analysis/skills/semgrep/SKILL.md

    Supports: summary, whySelected, bestFor, limitations, install, access, review

  2. https://github.com/trailofbits/skills/blob/8e54050ae63c2f62224c35b1616efe71865b4777/README.md

    Supports: install

  3. CC-BY-SA-4.0 licence ↗Checked

    https://github.com/trailofbits/skills/blob/8e54050ae63c2f62224c35b1616efe71865b4777/LICENSE

    Supports: license

  4. https://github.com/trailofbits/skills/blob/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/static-analysis/skills/semgrep/scripts/run-scans.sh

    Supports: review, limitations, access, install

Evidence & Ask