Official agent skill

Semgrep Security Scan

by trailofbits in trailofbits/skills

Detects languages, proposes rulesets for approval, then runs the approved Semgrep scan across a codebase and merges the output into one SARIF file.

OfficialCC-BY-SA-4.0Auto-check: notesSecurity

Install Semgrep Security Scan

skills CLI
$ npx skills add trailofbits/skills --skill semgrep -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install trailofbits/skills semgrep --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/trailofbits/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/static-analysis/skills/semgrep .claude/skills/semgrep && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
semgrep
GitHub stars
7.4k
Token cost
~3.7k tokens
SKILL.md length
1,439 words
Files
9 (incl. scripts, references, assets)
Skills in repo
79
Repo updated
First seen
Licence
CC-BY-SA-4.0

At a glance

Detects languages, proposes rulesets for approval, then runs the approved Semgrep scan across a codebase and merges the output into one SARIF file.

  • Works in 6 steps: Always use --metrics=off — Semgrep sends… → User must approve the scan plan (Step 3… → Third-party rulesets are required, not… → …
  • Running a security audit of a codebase before release
  • SKILL.md covers Essential Principles, When to Use, When NOT to Use and Output Directory, plus 9 more sections
  • Runs Python and Shell scripts from its folder; calls semgrep and uv

What it does

This skill always runs semgrep with --metrics=off so telemetry never leaks during an audit, and treats presenting the exact rulesets, target, engine, and mode for explicit approval as a hard gate before any scanner spawns. It always adds third-party rulesets from Trail of Bits, 0xdea, and Decurity alongside the official registry whenever the detected language matches.

scripts/run-scans.sh builds and batches every semgrep command from the approved list and writes scans.json, which this skill then merges into SARIF; it checks for Semgrep Pro's cross-file taint analysis before scanning, and reports any ruleset that failed to clone or exited non-zero rather than presenting a partial scan as a complete one. It supports a full-coverage mode and a medium-to-high-confidence-only mode, writing results to a numbered output directory.

When your agent uses it

  • Running a security audit of a codebase before release
  • Finding known vulnerability patterns before code review
  • Doing a first static-analysis pass with scoped rulesets

Example prompts

  • “Scan this repo for vulnerabilities with Semgrep, important findings only.”
  • “Run a full Semgrep audit across every detected language here.”
  • “Check whether Semgrep Pro is available before scanning this service.”

Requirements

  • Semgrep installed
  • Semgrep Pro license for cross-file taint analysis (optional)
  • Pre-approved tools (allowed-tools): Bash, Read, Glob, AskUserQuestion, TaskCreate, TaskList, TaskUpdate

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Always use --metrics=off — Semgrep sends telemetry by default; --config auto also phones home. Every semgrep command must include…
  2. User must approve the scan plan (Step 3 is a hard gate) — The original "scan this codebase" request is NOT approval. Present exact…
  3. Third-party rulesets are required, not optional — Trail of Bits, 0xdea, and Decurity rules catch vulnerabilities absent from the official…
  4. scripts/run-scans.sh generates the commands; do not write them yourself — it builds every semgrep line from the approved list. That is…
  5. Always check for Semgrep Pro before scanning — Pro enables cross-file taint tracking and catches ~250% more true positives. Skipping the…
  6. Report what did not run — scans.json carries failed and skipped alongside scans. A ruleset whose repo would not clone, or whose scan…

What it can do on your machine

Read from SKILL.md and the folder at commit 82fe822. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Glob
    • AskUserQuestion
    • TaskCreate
    • TaskList
    • TaskUpdate

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (Python and Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • semgrep
    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • semgrep.dev

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Semgrep Security Scan loads about 3.7k tokens when it runs, and up to ~7.8k if it reads all its reference files. Until then it costs about 179 tokens; SKILL.md has 1,439 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~179
When it runs · the whole SKILL.md, loaded when a task matches
~3.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Glob, AskUserQuestion, TaskCreate, TaskList, TaskUpdate

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from trailofbits/skills at commit 82fe822, republished under its CC-BY-SA-4.0 licence (© trailofbits). 1,439 words, ~3,725 tokens.

Download SKILL.mdSave it as .claude/skills/semgrep/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
semgrep
description
Runs a Semgrep security scan over a codebase: detects languages, selects rulesets, presents the plan for explicit approval, then runs every approved ruleset through scripts/run-scans.sh, which batches the semgrep processes and writes scans.json, and merges the output to SARIF. Supports two scan modes, "run all" for full ruleset coverage and "important only" for security findings at medium-to-high confidence and impact. Uses Semgrep Pro for cross-file taint analysis when it is available. Use when asked to scan code for vulnerabilities, run a security audit with Semgrep, find bugs, or perform static analysis. For the same scan without the approval gate, use the /static-analysis:semgrep-scan workflow.
allowed-tools
Bash, Read, Glob, AskUserQuestion, TaskCreate, TaskList, TaskUpdate

Semgrep Security Scan

Run a Semgrep scan with automatic language detection, parallel execution, and merged SARIF output.

Essential Principles

  1. Always use --metrics=off — Semgrep sends telemetry by default; --config auto also phones home. Every semgrep command must include --metrics=off to prevent data leakage during security audits.
  2. User must approve the scan plan (Step 3 is a hard gate) — The original "scan this codebase" request is NOT approval. Present exact rulesets, target, engine, and mode; wait for explicit "yes"/"proceed" before spawning scanners.
  3. Third-party rulesets are required, not optional — Trail of Bits, 0xdea, and Decurity rules catch vulnerabilities absent from the official registry. Include them whenever the detected language matches.
  4. scripts/run-scans.sh generates the commands; do not write them yourself — it builds every semgrep line from the approved list. That is what makes --metrics=off, the --include scoping rule, and the parallel dispatch properties of the code rather than instructions. Give it the approved rulesets and let it run.
  5. Always check for Semgrep Pro before scanning — Pro enables cross-file taint tracking and catches ~250% more true positives. Skipping the check means silently missing critical inter-file vulnerabilities.
  6. Report what did not run — scans.json carries failed and skipped alongside scans. A ruleset whose repo would not clone, or whose scan exited non-zero, must appear in the report. A partial scan presented as a complete one is worse than no scan.

When to Use

  • Security audit of a codebase
  • Finding vulnerabilities before code review
  • Scanning for known bug patterns
  • First-pass static analysis

When NOT to Use

  • Binary analysis → Use binary analysis tools
  • Already have Semgrep CI configured → Use existing pipeline
  • Need cross-file analysis but no Pro license → Consider CodeQL as alternative
  • Creating custom Semgrep rules → Use semgrep-rule-creator skill
  • Porting existing rules to other languages → Use semgrep-rule-variant-creator skill

Output Directory

All scan results, SARIF files, and temporary data are stored in a single output directory.

  • If the user specifies an output directory in their prompt, use it as OUTPUT_DIR.
  • If not specified, default to ./static_analysis_semgrep_1. If that already exists, increment to _2, _3, etc.

In both cases, always create the directory with mkdir -p before writing any files.

bash
# Resolve output directory
if [ -n "$USER_SPECIFIED_DIR" ]; then
  OUTPUT_DIR="$USER_SPECIFIED_DIR"
else
  BASE="static_analysis_semgrep"
  N=1
  while [ -e "${BASE}_${N}" ]; do
    N=$((N + 1))
  done
  OUTPUT_DIR="${BASE}_${N}"
fi
mkdir -p "$OUTPUT_DIR/raw" "$OUTPUT_DIR/results"

The output directory is resolved once at the start of Step 1 and used throughout all subsequent steps.

$OUTPUT_DIR/
├── rulesets.json                # The approved plan (Step 3), read by run-scans.sh (Step 4)
├── scans.json                   # What ran, failed, skipped, and covered nothing (Step 4)
├── raw/                         # Per-scan raw output (unfiltered)
│   ├── python-python.json        # <language>-<ruleset> for language-scoped rules
│   ├── python-python.sarif
│   ├── python-django.json
│   ├── python-django.sarif
│   ├── all-security-audit.json   # all-<ruleset> for cross-language rules, run once
│   ├── all-security-audit.sarif
│   └── ...
└── results/                     # Final merged output
    └── results.sarif

Prerequisites

Required: Semgrep CLI (semgrep --version). If not installed, see Semgrep installation docs.

Optional: Semgrep Pro — enables cross-file taint tracking, inter-procedural analysis, and additional languages (Apex, C#, Elixir). Check with:

bash
# --metrics=off because Principle 1 has no exceptions, and this is the first semgrep command
# of a run. stderr is kept because "OSS only" has several causes (logged out, no subscription,
# registry blocked) and the run downgrades silently for all of them.
if PRO_ERR=$(semgrep --pro --validate --metrics=off --config p/default 2>&1); then
  echo "Pro available"
else
  echo "OSS only"
  echo "  reason: $(printf '%s' "$PRO_ERR" | tail -n 3)"
fi

Limitations: OSS mode cannot track data flow across files. Pro mode uses -j 1 for cross-file analysis (slower per ruleset, but parallel rulesets compensate).

Scan Modes

Select mode in Step 2. Mode affects both the scan flags and post-processing.

ModeCoverageFindings Reported
Run allAll rulesets, all severity levelsEverything
Important onlyAll rulesets, pre- and post-filteredSecurity vulns only, medium-high confidence/impact

Important only applies two filter layers:

  1. Pre-filter: --severity WARNING --severity ERROR (CLI flag)
  2. Post-filter: JSON metadata — keeps only category=security, confidence∈{MEDIUM,HIGH}, impact∈{MEDIUM,HIGH}

See scan-modes.md for metadata criteria and jq filter commands.

Orchestration Architecture

┌──────────────────────────────────────────────────────────────────┐
│ MAIN SESSION (this skill)                                        │
│ Step 1: Detect languages + check Pro availability                │
│ Step 2: Select scan mode + rulesets (ref: rulesets.md)           │
│ Step 3: Present plan + rulesets, get approval [⛔ HARD GATE]     │
│ Step 4: Run scripts/run-scans.sh with the approved rulesets      │
│ Step 5: Post-filter, merge, report, delete repos/                │
└──────────────────────────────────────────────────────────────────┘
         │ Step 4: Bash
         ▼
┌──────────────────────────────────────────────────────────────────┐
│ scripts/run-scans.sh                                             │
│   clone       each third-party repo once, into repos/            │
│   generate    one semgrep command per ruleset                    │
│                ├── python     p/python, p/django   --include=*.py│
│                ├── javascript p/javascript         --include=*.js│
│                ├── docker     p/dockerfile                       │
│                └── cross-language  p/security-audit, p/secrets,  │
│                                    the cloned repos  (no filter) │
│   run         in batches of --jobs, exit code read per process   │
│   write       scans.json — scans, failed, skipped                │
└──────────────────────────────────────────────────────────────────┘

The approval gate stays in the session; the script is execution only and asks nothing. The approved list reaches it as a JSON file, so the scan cannot reach a ruleset the user declined.

Cross-language rulesets go in one shared unit rather than being repeated per language. p/security-audit, p/secrets, and the third-party repos scan the whole target unscoped, so running them once per language ran the identical command N times and left the SARIF merge to dedup the copies.

Running it as a Workflow

This plugin ships /static-analysis:semgrep-scan, which runs the whole scan end to end: detect languages and Pro, select rulesets from rulesets.md, run scripts/run-scans.sh, merge and report. Pass it a JSON object, not prose:

/static-analysis:semgrep-scan {"target": "/abs/path", "mode": "run-all"}

It does not stop for ruleset approval. Invoking it with a target is the opt-in, the same way /variant-analysis:variants works. That is safe to do because the scan is read-only over the target — no --autofix, every write inside the output directory — so the approval gate below is a scope confirmation rather than a safety one. What ran is recorded in rulesets.json and scans.json either way.

Use the workflow when you want the scan run; work the five steps below when the ruleset selection itself matters and you want to see and edit the list first.

Workflow

Follow the detailed workflow in scan-workflow.md. Summary:

StepActionGateKey Reference
1Resolve output dir, detect languages + Pro availability—Use Glob, not Bash
2Select scan mode + rulesets—rulesets.md
3Present plan, get explicit approval⛔ HARDAskUserQuestion
4Run the scans—scripts/run-scans.sh
5Post-filter, merge, report, clean up—Merge script (below)

Task enforcement: On invocation, create 5 tasks with blockedBy dependencies (each step blocks the previous). Step 3 is a HARD GATE — mark complete ONLY after user explicitly approves.

Merge command (Step 5):

bash
# run-all
uv run --no-project {baseDir}/scripts/merge_sarif.py "$OUTPUT_DIR/raw" "$OUTPUT_DIR/results/results.sarif" \
  --scans "$OUTPUT_DIR/scans.json"

# important-only, once the JSON post-filter has run over every file in raw/
uv run --no-project {baseDir}/scripts/merge_sarif.py "$OUTPUT_DIR/raw" "$OUTPUT_DIR/results/results.sarif" \
  --important --scans "$OUTPUT_DIR/scans.json"

--scans drops the output of scans listed under .failed. A scan that died part-way may still have written a .sarif, and under --important that file has no post-filter beside it, which is an error rather than an empty filter. Without the flag one dead scan denies every healthy scan a merged result. The excluded files are named on stdout, so they can go in the report.

The post-filter reads metadata SARIF does not carry, so it cannot be re-run against the merged file; --important instead keeps the findings the JSON filter kept, matched on (rule, file, line). Without it results.sarif is unfiltered while the JSON side is not.

Show full SKILL.md (535 more words)Show less

Workflow and agents

ComponentPurpose
scripts/run-scans.shBuilds every scan command from the approved rulesets, runs them in batches, and writes scans.json

Step 4 is a Bash call. No subagent runs any part of the scan: exit codes and finding counts are read from the processes and the JSON they wrote.

Rationalizations to Reject

ShortcutWhy It's Wrong
"User asked for scan, that's approval"Original request ≠ plan approval. Present plan, use AskUserQuestion, await explicit "yes"
"Step 3 task is blocking, just mark complete"Lying about task status defeats enforcement. Only mark complete after real approval
"I already know what they want"Assumptions cause scanning wrong directories/rulesets. Present plan for verification
"Just use default rulesets"User must see and approve exact rulesets before scan
"Add extra rulesets without asking"Modifying approved list without consent breaks trust
"Third-party rulesets are optional"Trail of Bits, 0xdea, Decurity catch vulnerabilities not in official registry — REQUIRED
"Use --config auto"Sends metrics; less control over rulesets
"I'll just run the semgrep commands myself"run-scans.sh is what enforces --metrics=off, the --include rule and the output-directory --exclude. Hand-written commands drop them silently
"The script failed, I'll run semgrep directly to get something"A non-zero exit means no scan succeeded. Report that and stop; a hand-run subset reads as a full scan
"Some scans failed, the run still finished"failed and skipped are part of scans.json. Report them or the user reads a partial scan as a clean one
"Pro is too slow, skip --pro"Cross-file analysis catches 250% more true positives; worth the time
"Semgrep handles GitHub URLs natively"URL handling fails on repos with non-standard YAML; always clone first
"Cleanup is optional"Cloned repos pollute the user's workspace and accumulate across runs
"Use . or relative path as target"Subagents need absolute paths to avoid ambiguity
"Let the user pick an output dir later"Output directory must be resolved at Step 1, before any files are created

Reference Index

FileContent
rulesets.mdComplete ruleset catalog and selection algorithm
scan-modes.mdPre/post-filter criteria and jq commands
WorkflowPurpose
scan-workflow.mdComplete 5-step scan execution process
scripts/run-scans.shThe scan runner Step 4 calls

Success Criteria

  • Output directory resolved (user-specified or auto-incremented default)
  • All generated files stored inside $OUTPUT_DIR
  • Languages detected with file counts; Pro status checked
  • Scan mode selected by user (run all / important only)
  • Rulesets include third-party rules for all detected languages
  • User explicitly approved the scan plan (Step 3 gate passed)
  • run-scans.sh exited 0 and wrote $OUTPUT_DIR/scans.json
  • failed and skipped from scans.json are empty, or listed in the report
  • Scans marked partial in scans.json are none, or listed in the report — they ran with some of their rules failing to compile
  • Every semgrep command used --metrics=off
  • Approved plan written to $OUTPUT_DIR/rulesets.json at the Step 3 gate, and passed to the scanner unchanged
  • coveredNothing from scans.json is empty, or listed in the report
  • oversized from scans.json is empty, or listed in the report — those files exceed --max-target-bytes and no ruleset opened them
  • Raw per-scan outputs stored in $OUTPUT_DIR/raw/
  • results.sarif exists in $OUTPUT_DIR/results/ and is valid JSON
  • Important-only mode: post-filter applied before merge, merge run with --important, unfiltered results preserved in raw/
  • Results summary reported with severity and category breakdown
  • Cloned repos (if any) cleaned up from $OUTPUT_DIR/repos/

© trailofbits, CC-BY-SA-4.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files (scripts, references, assets) in plugins/static-analysis/skills/semgrep of trailofbits/skills.

  • SKILL.md
  • agents/openai.yaml
  • assets/trail-of-bits-mark.svg
  • references/rulesets.md
  • references/scan-modes.md
  • scripts/merge_sarif.py
  • scripts/run-scans.sh
  • scripts/test_merge_sarif.py
  • workflows/scan-workflow.md

Open the folder on GitHubat commit 82fe822

Compare with similar skills

Semgrep Security Scan next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Semgrep Security Scan compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Semgrep Security Scan this skilltrailofbits/skills7.4k—~3.7kAutomated safety check: NotesCC-BY-SA-4.0
Kedro Security Reviewkedro-org/kedro11k—~3.3kAutomated safety check: PassCustom licence
Kedro Plugins Security Reviewkedro-org/kedro-plugins119—~3.1kAutomated safety check: PassApache-2.0
Code Auditzhaoxuya520/reverse-skill40k2 repos~374Automated safety check: WarnMIT
Security ReviewerJeffallan/claude-skills12k—~1.3kAutomated safety check: PassMIT
Code Auditsickn33/agentic-awesome-skills47k1 repos~480Automated safety check: PassMIT

Similar skills

  • Kedro Security Review

    kedro-org/kedro

    Run a Kedro security scan on the full codebase or just a pull request.

    11k GitHub stars~3.3k tokensUpdated yesterday
    SecurityAuto-check passed
  • Kedro Plugins Security Review

    kedro-org/kedro-plugins

    Run a security scan on the kedro-plugins codebase or a pull request.

    119 GitHub stars~3.1k tokensUpdated 6 days ago
    SecurityAuto-check passed
  • Code Audit

    zhaoxuya520/reverse-skill

    A skill your agent uses for authorized source-code security review and SAST workflows including Semgrep, CodeQL patterns, dangerous API hunting, and fix verification.

    40k GitHub starsUsed in 2 repos~374 tokens
    SecurityAuto-check: warnings
  • Security Reviewer

    Jeffallan/claude-skills

    Audits code and infrastructure for vulnerabilities and produces a severity-rated report with locations and remediation, using SAST, dependency and secrets scans plus manual review.

    12k GitHub stars~1.3k tokensUpdated 4 days ago
    SecurityAuto-check passed
  • Code Audit

    sickn33/agentic-awesome-skills

    Authorized source-code security review and SAST workflows: Semgrep and CodeQL pattern hunting, dangerous API identification, and fix verification.

    47k GitHub starsUsed in 1 repo~480 tokens
    SecurityAuto-check passed
  • Semgrep

    alpha-omega-security/scrutineer

    Run semgrep's p/security-audit and p/secrets rulesets and map hits into the findings shape.

    231 GitHub stars~439 tokensUpdated today
    SecurityAuto-check passed

More from trailofbits/skills

All 79 skills in this repo
  • CodeQL Security Scan

    trailofbits/skills

    Official

    Scans a codebase for vulnerabilities with CodeQL's data flow and taint tracking in run-all or important-only modes, including data extensions for project-specific sources and sinks.

    7.4k GitHub stars~4.6k tokensUpdated 5 days ago
    Auto-check: notes
  • Code Graph Mermaid Diagrams

    trailofbits/skills

    Official

    Generates Mermaid diagrams from Trailmark code graphs, including call graphs, class hierarchies, module dependency maps, complexity heatmaps and attack surface data flows.

    7.4k GitHub stars~1.7k tokensUpdated 5 days ago
    Auto-check passed
  • Trailmark Graph Evolution

    trailofbits/skills

    Official

    Compares Trailmark code graphs at two snapshots, such as commits, tags or directories, to surface attack paths, blast radius and taint changes that text diffs miss.

    7.4k GitHub stars~3.4k tokensUpdated 5 days ago
    Auto-check passed
  • Let Fate Decide

    trailofbits/skills

    Official

    Draws a 12 Houses tarot spread to break ties when a request is vague or casually delegated, then reads the cards to pick the next step.

    7.4k GitHub stars~2.5k tokensUpdated 5 days ago
    Auto-check: notes
  • Burp Suite Project Parser

    trailofbits/skills

    Official

    Searches and extracts data from Burp Suite project files on the command line: regex searches over responses, audit findings, proxy history and site map data.

    7.4k GitHub starsUsed in 3 repos~4.2k tokens
    Auto-check: notes
  • Code Context Slicing

    trailofbits/skills

    Official

    Picks a small, graph-based slice of source with Trailmark and hands a focused code task to a smaller or local model without exposing the whole repository.

    7.4k GitHub stars~2.1k tokensUpdated 5 days ago
    Auto-check passed

Works with

Categories

Questions about Semgrep Security Scan

What does Semgrep Security Scan do?

Detects languages, proposes rulesets for approval, then runs the approved Semgrep scan across a codebase and merges the output into one SARIF file. This skill always runs semgrep with --metrics=off so telemetry never leaks during an audit, and treats presenting the exact rulesets, target, engine, and mode for explicit approval as a hard gate before any scanner spawns. It always adds third-party rulesets from Trail of Bits, 0xdea, and Decurity alongside the official registry whenever the detected language matches.

When should I use Semgrep Security Scan?

Semgrep Security Scan fits situations like: running a security audit of a codebase before release; finding known vulnerability patterns before code review; doing a first static-analysis pass with scoped rulesets.

How do I install Semgrep Security Scan in Claude Code?

Run `npx skills add trailofbits/skills --skill semgrep -a claude-code`. Or copy the skill folder (plugins/static-analysis/skills/semgrep in trailofbits/skills) into .claude/skills/semgrep in your project. Claude Code loads it when a task matches its description.

How do I install Semgrep Security Scan in Codex?

Run `npx skills add trailofbits/skills --skill semgrep -a codex`. Or copy the skill folder (plugins/static-analysis/skills/semgrep in trailofbits/skills) into .agents/skills/semgrep in your project. Codex loads it when a task matches its description.

Can I use Semgrep Security Scan in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add trailofbits/skills --skill semgrep -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/semgrep, .gemini/skills/semgrep, .github/skills/semgrep and .opencode/skills/semgrep in your project.

What does Semgrep Security Scan need to run?

Going by SKILL.md and its folder, Semgrep Security Scan needs Python and a shell for the scripts in its folder and the command-line tools its instructions call (semgrep and uv). Our summary lists: Semgrep installed; Semgrep Pro license for cross-file taint analysis (optional). Its frontmatter pre-approves these tools: Bash, Read, Glob, AskUserQuestion, TaskCreate, TaskList, TaskUpdate.

Does Semgrep Security Scan access the network?

SKILL.md names 1 domain. As links in the text: semgrep.dev. This is read from the text; nothing was executed.

Is Semgrep Security Scan safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Semgrep Security Scan use?

Semgrep Security Scan is published under the CC-BY-SA-4.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Semgrep Security Scan use?

About 3.7k tokens (SKILL.md is roughly 15k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.1k tokens, read only when the agent opens those files.

What are the alternatives to Semgrep Security Scan?

Skills that share tags, products or a category with Semgrep Security Scan: Kedro Security Review (kedro-org/kedro, 11k stars), Kedro Plugins Security Review (kedro-org/kedro-plugins, 119 stars), Code Audit (zhaoxuya520/reverse-skill, 40k stars) and Security Reviewer (Jeffallan/claude-skills, 12k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Semgrep Security Scan?

trailofbits (a GitHub organization, an official publisher) maintains it in trailofbits/skills, which has 7,400 GitHub stars. The repository holds 79 skills in this directory. The repository was last updated on October 2, 2026.

Source: trailofbits/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.