Source profileQuality 97/100

backspace-shmackspace/claude-devkit/skills/semgrep/SKILL.md

semgrep

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.

Source repository stars
15
Declared platforms
0
Static risk flags
3
Last source update
2026-08-24
Source checked
2026-08-25

Decision brief

What it does: where it fits

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

Best for

  • Security audit of a codebase
  • Finding vulnerabilities before code review
  • Scanning for known bug patterns

Not for

  • Binary analysis → Use binary analysis tools
  • Already have Semgrep CI configured → Use existing pipeline

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/backspace-shmackspace/claude-devkit --skill "skills/semgrep"
Safe inspection promptEditorial

Inspect the Agent Skill "semgrep" from https://github.com/backspace-shmackspace/claude-devkit/blob/7d11c4a8aa4be142a6ea4792604f8a7b39f0d789/skills/semgrep/SKILL.md at commit 7d11c4a8aa4be142a6ea4792604f8a7b39f0d789. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Workflow

    Follow the five steps below (expanded from upstream scan-workflow.md). Track them as a checklist; Step 3 is mandatory approval before any scan.

    Follow the five steps below (expanded from upstream scan-workflow.md). Track them as a checklist; Step 3 is mandatory approval before any scan.Merge SARIF (Step 5, no upstream script required): After optional important-only JSON post-filter (see inlined scan-modes), merge per-run SARIF files:Adjust the glob if you need a subset. The upstream repo also ships a Python merge helper; (see upstream Trail of Bits prodsec-skills for companion files).
  2. 02

    Step 1: Always Include Security Baseline

    p/security-audit - Comprehensive vulnerability detection (always include)

    p/security-audit - Comprehensive vulnerability detection (always include)p/secrets - Hardcoded credentials, API keys, tokens (always include)- p/security-audit - Comprehensive vulnerability detection (always include) - p/secrets - Hardcoded credentials, API keys, tokens (always include)
  3. 03

    Step 2: Add Language-Specific Rulesets

    For each detected language, add the primary ruleset. If a framework is detected, add its ruleset too.

    For each detected language, add the primary ruleset. If a framework is detected, add its ruleset too.GA Languages (production-ready):Beta Languages (Pro recommended):
  4. 04

    Step 3: Add Infrastructure Rulesets

    Review the “Step 3: Add Infrastructure Rulesets” section in the pinned source before continuing.

    Review and apply the “Step 3: Add Infrastructure Rulesets” source section.
  5. 05

    Step 4: Add Third-Party Rulesets

    These are NOT optional. Include automatically when language matches:

    These are NOT optional. Include automatically when language matches:

Permission review

Static risk signals and limitations

Reads files

low · line 9

The documentation asks the agent to read local files, directories, or repositories.

**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 running scanners.

Writes files

medium · line 36

The documentation asks the agent to create, modify, or delete local files.

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

Network access

medium · line 134

The documentation includes network, browsing, or remote request actions.

jq -s '{"version": "2.1.0", "$schema": "https://json.schemastore.org/sarif-2.1.0.json", "runs": [.[].runs[]]}' "$OUTPUT_DIR/raw"/*.sarif > "$OUTPUT_DIR/results/results.sarif"

Network access

medium · line 328

The documentation includes network, browsing, or remote request actions.

https://github.com/trailofbits/semgrep-rules

Reads files

low · line 384

The documentation asks the agent to read local files, directories, or repositories.

| `[TARGET]` | Absolute path to directory to scan | /path/to/codebase |

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score97/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars15SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
backspace-shmackspace/claude-devkit
Skill path
skills/semgrep/SKILL.md
Commit
7d11c4a8aa4be142a6ea4792604f8a7b39f0d789
License
MIT
Collected
2026-08-25
Default branch
main
View the original SKILL.md

Semgrep Security Scan

Run a Semgrep scan with automatic language detection, parallel execution across language groups, 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 running 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. Run all scan workers in parallel — Parallel execution is the core performance advantage. Do not run language scans strictly one-after-another when independence allows overlap.
  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.

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.

# 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.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:

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).

Scan Modes

Select mode in Step 2 of the workflow. Mode affects both scanner 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 MEDIUM --severity HIGH --severity CRITICAL (CLI flag)
  2. Post-filter: JSON metadata — keeps only category=security, confidence∈{MEDIUM,HIGH}, impact∈{MEDIUM,HIGH}

Details and jq commands are in Inlined: scan modes below.

Orchestration Architecture

┌──────────────────────────────────────────────────────────────────┐
│ Coordinator (this skill)                                         │
│ Step 1: Detect languages + check Pro availability                │
│ Step 2: Select scan mode + rulesets                              │
│ Step 3: Present plan + rulesets, get approval [⛔ HARD GATE]    │
│ Step 4: Run parallel scans (approved rulesets + mode)            │
│ Step 5: Merge results and report                                 │
└──────────────────────────────────────────────────────────────────┘
         │ Step 4
         ▼
┌─────────────────┐
│ Scan workers    │
│ (parallel)      │
├─────────────────┤
│ Python scanner  │
│ JS/TS scanner   │
│ Go scanner      │
│ Docker scanner  │
└─────────────────┘

Workflow

Follow the five steps below (expanded from upstream scan-workflow.md). Track them as a checklist; Step 3 is mandatory approval before any scan.

StepActionGateKey reference
1Resolve output dir, detect languages + Pro availabilityGlob/file patterns below
2Select scan mode + rulesetsInlined: rulesets
3Present plan, get explicit approval⛔ HARDAsk the user
4Run parallel scansInlined: scanner task prompt
5Merge results and reportMerge SARIF (below)

Merge SARIF (Step 5, no upstream script required): After optional important-only JSON post-filter (see inlined scan-modes), merge per-run SARIF files:

jq -s '{"version": "2.1.0", "$schema": "https://json.schemastore.org/sarif-2.1.0.json", "runs": [.[].runs[]]}' "$OUTPUT_DIR/raw"/*.sarif > "$OUTPUT_DIR/results/results.sarif"

Adjust the glob if you need a subset. The upstream repo also ships a Python merge helper; (see upstream Trail of Bits prodsec-skills for companion files).

Verify merged output parses as JSON and report counts by severity/category.

Rationalizations to Reject

ShortcutWhy It's Wrong
"User asked for scan, that's approval"Original request ≠ plan approval. Present plan, await explicit "yes"
"Step 3 task is blocking, just mark complete"Do not skip the real approval gate
"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 scan at a time"Defeats parallelism; run independent ruleset scans in parallel where safe
"Pro is too slow, skip --pro"Cross-file analysis catches many 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"Prefer absolute paths for workers 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

TopicLocation
Ruleset catalog + selectionInlined: rulesets below
Important-only filtersInlined: scan modes below
Worker instructionsInlined: scanner task prompt below
Full step-by-step narrative(see upstream Trail of Bits prodsec-skills for companion files)workflows/scan-workflow.md

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)
  • All scan workers completed; parallel execution used where applicable
  • Every semgrep command used --metrics=off
  • Approved rulesets logged to $OUTPUT_DIR/rulesets.txt
  • 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; unfiltered results preserved in raw/
  • Results summary reported with severity and category breakdown
  • Cloned repos (if any) cleaned up from $OUTPUT_DIR/repos/

Inlined: scan modes (upstream reference/scan-modes.md)

Scan Modes Reference

Mode: Run All

Full scan with all rulesets and severity levels. Current default behavior. No filtering applied — all findings are reported and triaged.

Mode: Important Only

Focused on high-confidence security vulnerabilities. Excludes code quality, best practices, and low-confidence audit findings.

Pre-Filter: CLI Severity Flag

Add these flags to every semgrep command:

--severity MEDIUM --severity HIGH --severity CRITICAL

This excludes LOW/INFO severity findings at scan time, reducing output volume before post-filtering.

Post-Filter: Metadata Criteria

After scanning, filter each JSON result file to keep only findings matching ALL of:

Metadata FieldAccepted ValuesRationale
extra.metadata.category"security"Excludes correctness, best-practice, maintainability, performance
extra.metadata.confidence"MEDIUM", "HIGH"Excludes low-precision rules (high false positive rate)
extra.metadata.impact"MEDIUM", "HIGH"Excludes low-impact informational findings

Third-party rules (Trail of Bits, 0xdea, Decurity, etc.) may not have confidence/impact/category metadata. Findings without these metadata fields are kept — we cannot filter what is not annotated, and third-party rules are typically security-focused.

Semgrep Metadata Background

Semgrep security rules have these metadata fields (required for category: security in the official registry):

FieldPurposeValues
severity (top-level)Overall rule severity, derived from likelihood × impactLOW, MEDIUM, HIGH, CRITICAL
categoryRule categorysecurity, correctness, best-practice, maintainability, performance
confidenceTrue positive rate of the rule (precision)LOW, MEDIUM, HIGH
impactPotential damage if vulnerability is exploitedLOW, MEDIUM, HIGH
likelihoodHow likely the vulnerability is exploitableLOW, MEDIUM, HIGH
subcategoryFinding typevuln, audit, secure default

Key relationship: severity = f(likelihood, impact) while confidence is independent (describes rule quality, not vulnerability severity).

Post-Filter jq Command

Apply to each JSON result file after scanning:

# Filter a single result file
jq '{
  results: [.results[] |
    ((.extra.metadata.category // "security") | ascii_downcase) as $cat |
    ((.extra.metadata.confidence // "HIGH") | ascii_upcase) as $conf |
    ((.extra.metadata.impact // "HIGH") | ascii_upcase) as $imp |
    select(
      ($cat == "security") and
      ($conf == "MEDIUM" or $conf == "HIGH") and
      ($imp == "MEDIUM" or $imp == "HIGH")
    )
  ],
  errors: .errors,
  paths: .paths
}' "$f" > "${f%.json}-important.json"

Default values (// "security", // "HIGH") handle third-party rules without metadata — they pass all filters by default.

Filter All Result Files in a Directory

Raw scan output lives in $OUTPUT_DIR/raw/. The filter creates *-important.json files alongside the originals — the raw files are preserved unmodified.

# Apply important-only filter to all scan result JSON files in raw/
for f in "$OUTPUT_DIR/raw"/*-*.json; do
  [[ "$f" == *-triage.json || "$f" == *-important.json ]] && continue
  jq '{
    results: [.results[] |
      ((.extra.metadata.category // "security") | ascii_downcase) as $cat |
      ((.extra.metadata.confidence // "HIGH") | ascii_upcase) as $conf |
      ((.extra.metadata.impact // "HIGH") | ascii_upcase) as $imp |
      select(
        ($cat == "security") and
        ($conf == "MEDIUM" or $conf == "HIGH") and
        ($imp == "MEDIUM" or $imp == "HIGH")
      )
    ],
    errors: .errors,
    paths: .paths
  }' "$f" > "${f%.json}-important.json"
  BEFORE=$(jq '.results | length' "$f")
  AFTER=$(jq '.results | length' "${f%.json}-important.json")
  echo "$f: $BEFORE → $AFTER findings (filtered $(( BEFORE - AFTER )))"
done

Scanner Task Modifications

In important-only mode, add [SEVERITY_FLAGS] to each scanner command:

semgrep [--pro if available] --metrics=off [SEVERITY_FLAGS] --config [RULESET] --json -o [OUTPUT_DIR]/raw/[lang]-[ruleset].json --sarif-output=[OUTPUT_DIR]/raw/[lang]-[ruleset].sarif [TARGET] &

Where [SEVERITY_FLAGS] is:

  • Run all: (empty)
  • Important only: --severity MEDIUM --severity HIGH --severity CRITICAL

Inlined: scanner task prompt (upstream reference/scanner-task-prompt.md)

Scanner task prompt template

Use when delegating per-language Semgrep runs (replace bracketed placeholders).

Template

You are a Semgrep scanner for [LANGUAGE_CATEGORY].

## Task
Run Semgrep scans for [LANGUAGE] files and save results to [OUTPUT_DIR]/raw.

## Pro Engine Status: [PRO_AVAILABLE: true/false]

## Scan Mode: [SCAN_MODE: run-all/important-only]

## APPROVED RULESETS (from user-confirmed plan)
[LIST EXACT RULESETS USER APPROVED - DO NOT SUBSTITUTE]

Example:
- p/python
- p/django
- p/security-audit
- p/secrets
- https://github.com/trailofbits/semgrep-rules

## Commands to Run (in parallel)

### Clone GitHub URL rulesets first:
```bash
mkdir -p [OUTPUT_DIR]/repos
# For each GitHub URL ruleset, clone into [OUTPUT_DIR]/repos/[name]:
git clone --depth 1 https://github.com/org/repo [OUTPUT_DIR]/repos/repo-name

Generate commands for EACH approved ruleset:

semgrep [--pro if available] --metrics=off [SEVERITY_FLAGS] [INCLUDE_FLAGS] --config [RULESET] --json -o [OUTPUT_DIR]/raw/[lang]-[ruleset].json --sarif-output=[OUTPUT_DIR]/raw/[lang]-[ruleset].sarif [TARGET] &

Wait for all to complete:

wait

Clean up cloned repos:

[ -n "[OUTPUT_DIR]" ] && rm -rf [OUTPUT_DIR]/repos

Critical Rules

  • Use ONLY the rulesets listed above - do not add or remove any
  • Always use --metrics=off (prevents sending telemetry to Semgrep servers)
  • Use --pro when Pro is available (enables cross-file taint tracking)
  • If scan mode is important-only, add --severity MEDIUM --severity HIGH --severity CRITICAL to every command
  • If scan mode is run-all, do NOT add severity flags
  • Run all rulesets in parallel with & and wait
  • For GitHub URL rulesets, always clone into [OUTPUT_DIR]/repos/ and use the local path as --config (do NOT pass URLs directly to semgrep — its URL handling is unreliable for repos with non-standard YAML)
  • Add --include flags for language-specific rulesets (e.g., --include="*.py" for p/python). Do NOT add --include to cross-language rulesets like p/security-audit, p/secrets, or third-party repos
  • After all scans complete, delete [OUTPUT_DIR]/repos/ to avoid leaving cloned repos behind

Output

Report:

  • Number of findings per ruleset
  • Any scan errors
  • File paths of JSON results (in [OUTPUT_DIR]/raw/)
  • [If Pro] Note any cross-file findings detected

## Variable Substitutions

| Variable | Description | Example |
|----------|-------------|---------|
| `[LANGUAGE_CATEGORY]` | Language group being scanned | Python, JavaScript, Docker |
| `[LANGUAGE]` | Specific language | Python, TypeScript, Go |
| `[OUTPUT_DIR]` | Output directory (absolute path, resolved in Step 1) | /path/to/static_analysis_semgrep_1 |
| `[PRO_AVAILABLE]` | Whether Pro engine is available | true, false |
| `[SEVERITY_FLAGS]` | Severity pre-filter flags | *(empty)* for run-all, `--severity MEDIUM --severity HIGH --severity CRITICAL` for important-only |
| `[INCLUDE_FLAGS]` | File extension filter for language-specific rulesets | `--include="*.py"` for Python rulesets, *(empty)* for cross-language rulesets like p/security-audit, p/secrets, or third-party repos |
| `[RULESET]` | Semgrep ruleset identifier or local clone path | p/python, [OUTPUT_DIR]/repos/semgrep-rules |
| `[TARGET]` | Absolute path to directory to scan | /path/to/codebase |

---

## Inlined: rulesets (upstream `reference/rulesets.md`)

# Semgrep Rulesets Reference

## Complete Ruleset Catalog

### Security-Focused Rulesets

| Ruleset | Description | Use Case |
|---------|-------------|----------|
| `p/security-audit` | Comprehensive vulnerability detection, higher false positives | Manual audits, security reviews |
| `p/secrets` | Hardcoded credentials, API keys, tokens | Always include |
| `p/owasp-top-ten` | OWASP Top 10 web application vulnerabilities | Web app security |
| `p/cwe-top-25` | CWE Top 25 most dangerous software weaknesses | General security |
| `p/sql-injection` | SQL injection patterns and tainted data flows | Database security |
| `p/insecure-transport` | Ensures code uses encrypted channels | Network security |
| `p/gitleaks` | Hard-coded credentials detection (gitleaks port) | Secrets scanning |
| `p/findsecbugs` | FindSecBugs rule pack for Java | Java security |
| `p/phpcs-security-audit` | PHP security audit rules | PHP security |

### CI/CD Rulesets

| Ruleset | Description | Use Case |
|---------|-------------|----------|
| `p/default` | Default ruleset, balanced coverage | First-time users |
| `p/ci` | High-confidence security + logic bugs, low FP | CI pipelines |
| `p/r2c-ci` | Low false positives, CI-safe | CI/CD blocking |
| `p/r2c` | Community favorite, curated by Semgrep (618k+ downloads) | General scanning |
| `p/auto` | Auto-selects rules based on detected languages/frameworks | Quick scans |
| `p/comment` | Comment-related rules | Code review |

### Third-Party Rulesets

| Ruleset | Description | Maintainer |
|---------|-------------|------------|
| `p/gitlab` | GitLab-maintained security rules | GitLab |

---

## Ruleset Selection Algorithm

Follow this algorithm to select rulesets based on detected languages and frameworks.

### Step 1: Always Include Security Baseline

```json
{
  "baseline": ["p/security-audit", "p/secrets"]
}
  • p/security-audit - Comprehensive vulnerability detection (always include)
  • p/secrets - Hardcoded credentials, API keys, tokens (always include)

Step 2: Add Language-Specific Rulesets

For each detected language, add the primary ruleset. If a framework is detected, add its ruleset too.

GA Languages (production-ready):

DetectionPrimary RulesetFramework RulesetsPro Rule Count
.pyp/pythonp/django, p/flask, p/fastapi710+
.js, .jsxp/javascriptp/react, p/nodejs, p/express, p/nextjs, p/angular250+ (JS), 70+ (JSX)
.ts, .tsxp/typescriptp/react, p/nodejs, p/express, p/nextjs, p/angular230+
.gop/golangp/go (alias)80+
.javap/javap/spring, p/findsecbugs190+
.ktp/kotlinp/spring60+
.rbp/rubyp/rails40+
.phpp/phpp/symfony, p/laravel, p/phpcs-security-audit50+
.c, .cpp, .hp/c-150+
.rsp/rust-40+
.csp/csharp-170+
.scalap/scala-Community
.swiftp/swift-60+

Beta Languages (Pro recommended):

DetectionPrimary RulesetNotes
.ex, .exsp/elixirRequires Pro for best coverage
.cls, .triggerp/apexSalesforce; requires Pro

Experimental Languages:

DetectionPrimary RulesetNotes
.solNo official rulesetUse Decurity third-party rules
Dockerfilep/dockerfileLimited rules
.yaml, .ymlp/yamlK8s, GitHub Actions, docker-compose patterns
.jsonr/json.awsAWS IAM policies; use r/json.* for specific rules
Bash scripts-Community support
Cairo, Circom-Experimental, smart contracts

Framework detection hints:

FrameworkDetection SignalsRuleset
Djangosettings.py, urls.py, django in requirementsp/django
Flaskflask in requirements, @app.routep/flask
FastAPIfastapi in requirements, @app.get/postp/fastapi
Reactpackage.json with react dependency, .jsx/.tsx filesp/react
Next.jsnext.config.js, pages/ or app/ directoryp/nextjs
Angularangular.json, @angular/ dependenciesp/angular
Expressexpress in package.json, app.use() patternsp/express
NestJS@nestjs/ dependencies, @Controller decoratorsp/nodejs
Springpom.xml with spring, @SpringBootApplicationp/spring
RailsGemfile with rails, config/routes.rbp/rails
Laravelcomposer.json with laravel, artisanp/laravel
Symfonycomposer.json with symfony, config/packages/p/symfony

Step 3: Add Infrastructure Rulesets

DetectionRulesetDescription
Dockerfilep/dockerfileContainer security, best practices
.tf, .hclp/terraformIaC misconfigurations, CIS benchmarks, AWS/Azure/GCP
k8s manifestsp/kubernetesK8s security, RBAC issues
CloudFormationp/cloudformationAWS infrastructure security
GitHub Actionsp/github-actionsCI/CD security, secrets exposure
.yaml, .ymlp/yamlGeneric YAML patterns (K8s, docker-compose)
AWS IAM JSONr/json.awsIAM policy misconfigurations (use --config r/json.aws)

Step 4: Add Third-Party Rulesets

These are NOT optional. Include automatically when language matches:

LanguagesSourceWhy Required
Python, Go, Ruby, JS/TS, Terraform, HCLTrail of BitsSecurity audit patterns from real engagements (AGPLv3)
C, C++0xdeaMemory safety, low-level vulnerabilities
Solidity, Cairo, RustDecuritySmart contract vulnerabilities, DeFi exploits
GodgryskiAdditional Go-specific patterns
Android (Java/Kotlin)MindedSecurityOWASP MASTG-derived mobile security rules
Java, Go, JS/TS, C#, Python, PHPelttamSecurity consulting patterns
Dockerfile, PHP, Go, JavakonduktoContainer and web app security
PHP, Kotlin, JavadottaPentest-derived web/mobile app rules
Terraform, HCLHashiCorpHashiCorp infrastructure patterns
Swift, Java, Cobolakabe1iOS and legacy system patterns
JavaAtlassian LabsAtlassian-maintained Java rules
Python, JS/TS, Java, Ruby, Go, PHPApiiroMalicious code detection, supply chain

Step 5: Verify Rulesets

Before finalizing, verify official rulesets load:

# Quick validation (exits 0 if valid)
semgrep --config p/python --validate --metrics=off 2>&1 | head -3

Or browse the Semgrep Registry.

Output Format

{
  "baseline": ["p/security-audit", "p/secrets"],
  "python": ["p/python", "p/django"],
  "javascript": ["p/javascript", "p/react", "p/nodejs"],
  "docker": ["p/dockerfile"],
  "third_party": ["https://github.com/trailofbits/semgrep-rules"]
}

Frequently asked questions

What to verify before installation and use

What does the semgrep source document cover?

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

How do I install semgrep?

The source record exposes this install command: npx skills add https://github.com/backspace-shmackspace/claude-devkit --skill "skills/semgrep". Inspect the command and pinned source before running it.

Which permission-related actions were detected?

Static rules flagged read-files, write-files, network in the source; the page lists the matching lines and excerpts.

Alternatives

Compare before choosing

Computed 956,837

trailofbits/skills

semgrep

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

Computed 10024,921

alirezarezvani/claude-skills

app-store-optimization

App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

Computed 9965

brucesongs/kali-claw

insecure-design

Insecure Design (OWASP A06:2025) focuses on security flaws in system architecture and design phases, rather than code implementation-level bugs.

Computed 9916

NintendaDev/unikit-ai

unikit-docs

Generate and maintain the project's TECHNICAL documentation from its codebase — scans the project structure, tech stack, and module boundaries, then writes a lean README landing page plus detailed topic pages (architecture, modules, setup, build, APIs), only the docs that are relevant. Use whenever the user wants to create, update, or validate documentation of the CODE or the project itself, e.g. "generate documentation", "create docs", "write the README", "update the project docs", "document th