Semgrep Security Scan
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.
Run Semgrep static analysis scan on a codebase using parallel subagents.
$ npx skills add vigolium/piolium --skill semgrep -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install vigolium/piolium semgrep --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/vigolium/piolium.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/semgrep .claude/skills/semgrep && rm -rf skills-srcUse ~/.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/
Install the "semgrep" agent skill from https://github.com/vigolium/piolium/tree/main/skills/semgrep into .claude/skills/semgrep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "semgrep", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/vigolium/piolium/tree/main/skills/semgrepType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add vigolium/piolium --skill semgrep -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install vigolium/piolium semgrep --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vigolium/piolium.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/semgrep .agents/skills/semgrep && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "semgrep" agent skill from https://github.com/vigolium/piolium/tree/main/skills/semgrep into .agents/skills/semgrep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "semgrep", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add vigolium/piolium --skill semgrep -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install vigolium/piolium semgrep --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vigolium/piolium.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/semgrep .cursor/skills/semgrep && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "semgrep" agent skill from https://github.com/vigolium/piolium/tree/main/skills/semgrep into .cursor/skills/semgrep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "semgrep", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/vigolium/piolium.git --path skills/semgrep--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add vigolium/piolium --skill semgrep -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install vigolium/piolium semgrep --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vigolium/piolium.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/semgrep .gemini/skills/semgrep && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "semgrep" agent skill from https://github.com/vigolium/piolium/tree/main/skills/semgrep into .gemini/skills/semgrep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "semgrep", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install vigolium/piolium semgrepInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add vigolium/piolium --skill semgrep -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/vigolium/piolium.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/semgrep .github/skills/semgrep && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "semgrep" agent skill from https://github.com/vigolium/piolium/tree/main/skills/semgrep into .github/skills/semgrep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "semgrep", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add vigolium/piolium --skill semgrep -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install vigolium/piolium semgrep --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vigolium/piolium.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/semgrep .opencode/skills/semgrep && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "semgrep" agent skill from https://github.com/vigolium/piolium/tree/main/skills/semgrep into .opencode/skills/semgrep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "semgrep", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
semgrepRun Semgrep static analysis scan on a codebase using parallel subagents.
Semgrep is an agent skill from vigolium/piolium. Run Semgrep static analysis scan on a codebase using parallel subagents. Supports two scan modes — "run all" (full ruleset coverage) and "important only" (high-confidence security vulnerabilities). Automatically detects and uses Semgrep Pro for cross-file taint analysis when available. Use when asked to scan code for vulnerabilities, run a security audit with Semgrep, find bugs, or perform static analysis. Spawns parallel workers for multi-language codebases.
Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts and reference files (for example `references/rulesets.md`, `references/scan-modes.md` and `references/scanner-task-prompt.md`).
It sits in Security, covering Static analysis and SAST. It works with Semgrep. The repository describes itself as: A Pi-native extension for thorough, agentic security audits. The licence is MIT.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 9ffdcac. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
BashReadGlobTaskAskUserQuestionTaskCreateTaskListTaskUpdateFrom allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
semgrepuvFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
semgrep.devFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Semgrep loads about 2.4k tokens when it runs, and up to ~7k if it reads all its reference files. Until then it costs about 118 tokens; SKILL.md has 895 words of instructions outside code blocks.
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.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
allowed-tools: Bash, Read, Glob, Task, AskUserQuestion, TaskCreate, TaskList, TaskUpdateAutomated 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.
The full file from vigolium/piolium at commit 9ffdcac, republished under its MIT licence (© vigolium). 895 words, ~2,430 tokens.
.claude/skills/semgrep/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.Run a Semgrep scan with automatic language detection, parallel execution via Task subagents, and merged SARIF output.
--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.semgrep-rule-creator skillsemgrep-rule-variant-creator skillAll scan results, SARIF files, and temporary data are stored in a single output directory.
OUTPUT_DIR../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.
# 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.txt # Approved rulesets (logged after Step 3)
├── raw/ # Per-scan raw output (unfiltered)
│ ├── python-python.json
│ ├── python-python.sarif
│ ├── python-django.json
│ ├── python-django.sarif
│ └── ...
└── results/ # Final merged output
└── results.sarifRequired: 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:
semgrep --pro --validate --config p/default 2>/dev/null && echo "Pro available" || echo "OSS only"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).
Select mode in Step 2 of the workflow. Mode affects both scanner flags and post-processing.
| Mode | Coverage | Findings Reported |
|---|---|---|
| Run all | All rulesets, all severity levels | Everything |
| Important only | All rulesets, pre- and post-filtered | Security vulns only, medium-high confidence/impact |
Important only applies two filter layers:
--severity MEDIUM --severity HIGH --severity CRITICAL (CLI flag)category=security, confidence∈{MEDIUM,HIGH}, impact∈{MEDIUM,HIGH}See scan-modes.md for metadata criteria and jq filter commands.
┌──────────────────────────────────────────────────────────────────┐
│ MAIN AGENT (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: Spawn parallel scan Tasks (approved rulesets + mode) │
│ Step 5: Merge results and report │
└──────────────────────────────────────────────────────────────────┘
│ Step 4
▼
┌─────────────────┐
│ Scan Tasks │
│ (parallel) │
├─────────────────┤
│ Python scanner │
│ JS/TS scanner │
│ Go scanner │
│ Docker scanner │
└─────────────────┘Follow the detailed workflow in scan-workflow.md. Summary:
| Step | Action | Gate | Key Reference |
|---|---|---|---|
| 1 | Resolve output dir, detect languages + Pro availability | — | Use Glob, not Bash |
| 2 | Select scan mode + rulesets | — | rulesets.md |
| 3 | Present plan, get explicit approval | ⛔ HARD | AskUserQuestion |
| 4 | Spawn parallel scan Tasks | — | scanner-task-prompt.md |
| 5 | Merge results and report | — | 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):
uv run {baseDir}/scripts/merge_sarif.py $OUTPUT_DIR/raw $OUTPUT_DIR/results/results.sarif| Agent | Tools | Purpose |
|---|---|---|
static-analysis:semgrep-scanner | Bash | Executes parallel semgrep scans for a language category |
Use subagent_type: static-analysis:semgrep-scanner in Step 4 when spawning Task subagents.
| Shortcut | Why 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 |
| "One Task at a time" | Defeats parallelism; spawn all Tasks together |
| "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 |
| File | Content |
|---|---|
| rulesets.md | Complete ruleset catalog and selection algorithm |
| scan-modes.md | Pre/post-filter criteria and jq commands |
| scanner-task-prompt.md | Template for spawning scanner subagents |
| Workflow | Purpose |
|---|---|
| scan-workflow.md | Complete 5-step scan execution process |
$OUTPUT_DIRsemgrep command used --metrics=off$OUTPUT_DIR/rulesets.txt$OUTPUT_DIR/raw/results.sarif exists in $OUTPUT_DIR/results/ and is valid JSONraw/$OUTPUT_DIR/repos/© vigolium, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (scripts, references) in skills/semgrep of vigolium/piolium.
Open the folder on GitHubat commit 9ffdcac
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in vigolium/piolium, which our catalogue first saw on October 7, 2026.
Semgrep 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Semgrep this skillvigolium/piolium | 140 | 1 repos | ~2.4k | Automated safety check: Notes | MIT | |
| Semgrep Security Scantrailofbits/skills | 7.4k | — | ~3.7k | Automated safety check: Notes | CC-BY-SA-4.0 | |
| Sast SemgrepAgentSecOps/SecOpsAgentKit | 220 | 2 repos | ~2.4k | Automated safety check: Pass | Custom licence | |
| Semgrep Rule Creatortrailofbits/skills | 7.4k | 6 repos | ~1.8k | Automated safety check: Notes | CC-BY-SA-4.0 | |
| Semgrep Rule Variant Creatortrailofbits/skills | 7.4k | 5 repos | ~3.4k | Automated safety check: Notes | CC-BY-SA-4.0 | |
| Semgrepwaybarrios/opencode-power-pack | 533 | — | ~2.4k | Automated safety check: Pass | MIT |
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.
AgentSecOps/SecOpsAgentKit
Static application security testing (SAST) using Semgrep for vulnerability detection, security code review, and secure coding guidance with OWASP and CWE framework mapping.
trailofbits/skills
Creates custom Semgrep rules for detecting security vulnerabilities, bug patterns, and code patterns.
trailofbits/skills
Creates language variants of existing Semgrep rules. An agent skill from trailofbits/skills.
waybarrios/opencode-power-pack
Run Semgrep static analysis across a codebase, optionally using Semgrep Pro for cross-file taint analysis.
semgrep/skills
Run Semgrep static analysis scans and create custom detection rules.
vigolium/piolium
Verifies code implements exactly what documentation specifies for blockchain audits.
vigolium/piolium
A skill your agent uses when running a full security audit of an arbitrary source code repository, especially large, complex, multi-component, distributed, or non-standard architectures.
vigolium/piolium
A skill your agent uses to review code. An agent skill from vigolium/piolium.
Works with
Categories
Run Semgrep static analysis scan on a codebase using parallel subagents. Semgrep is an agent skill from vigolium/piolium. Run Semgrep static analysis scan on a codebase using parallel subagents.
Semgrep fits situations like: asked to scan code for vulnerabilities; run a security audit with Semgrep; perform static analysis.
Run `npx skills add vigolium/piolium --skill semgrep -a claude-code`. Or copy the skill folder (skills/semgrep in vigolium/piolium) into .claude/skills/semgrep in your project. Claude Code loads it when a task matches its description.
Run `npx skills add vigolium/piolium --skill semgrep -a codex`. Or copy the skill folder (skills/semgrep in vigolium/piolium) into .agents/skills/semgrep in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vigolium/piolium --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.
Going by SKILL.md and its folder, Semgrep needs Python for the scripts in its folder and the command-line tools its instructions call (semgrep and uv). Our summary lists: Python 3; Docker. Its frontmatter pre-approves these tools: Bash, Read, Glob, Task, AskUserQuestion, TaskCreate, TaskList, TaskUpdate.
SKILL.md names 1 domain. As links in the text: semgrep.dev. This is read from the text; nothing was executed.
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.
Semgrep is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.4k tokens (SKILL.md is roughly 9.7k 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.5k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Semgrep: Semgrep Security Scan (trailofbits/skills, 7.4k stars), Sast Semgrep (AgentSecOps/SecOpsAgentKit, 220 stars), Semgrep Rule Creator (trailofbits/skills, 7.4k stars) and Semgrep Rule Variant Creator (trailofbits/skills, 7.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
vigolium (a GitHub organization) maintains it in vigolium/piolium, which has 140 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on September 20, 2026.
Source: vigolium/piolium on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.