semgrep

Run Semgrep security scans with language detection and merged SARIF output.

1|Updated Jan 7, 2026
One-click install
npx skills add https://github.com/adamatdevops/forge-works --skill semgrep-adamatdevops
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: semgrep
Source: https://github.com/adamatdevops/forge-works/tree/main/.skills/trailofbits/semgrep
Command: npx skills add https://github.com/adamatdevops/forge-works --skill semgrep-adamatdevops

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

It helps you run comprehensive Semgrep security scans on a codebase and produce a consolidated SARIF report for review and triage.

Core Features & Use Cases

  • Language-aware, parallel scanning: Detects languages and runs Semgrep scans concurrently per detected language category.
  • Ruleset planning with hard approval gate: Requires you to explicitly approve the exact rulesets, target, and scan mode before any scanning begins.
  • Merged SARIF output (with deduplication fallback): Consolidates per-scan SARIF files into a single results/results.sarif using SARIF Multitool when available, otherwise a pure-Python merge.

Quick Start

Ask: “Run the semgrep skill on /path/to/codebase in run-all mode and write results to ./my_scan_output; include Pro if available.”

Frequently Asked Questions about semgrep

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Semgrep static analysis and output a consolidated SARIF report?

Semgrep static analysis runs automatically by detecting codebase languages, scanning concurrently per language category, and merging per-scan SARIF outputs into a single consolidated results.sarif report using SARIF Multitool or a pure-Python fallback.

Can I use custom rulesets when scanning code for security findings?

Yes, you can apply custom rulesets when scanning code for security findings. The skill generates an approved ruleset plan including required third-party rulesets, but blocks execution behind an explicit hard approval gate before any scanning begins.

Does Semgrep security scanning support different analysis modes?

Semgrep security scanning supports run-all and important-only scanning modes. You specify the desired mode during the ruleset planning phase, and the skill applies it across all detected languages during parallel worker execution.

What is the best way to ensure deterministic output for SARIF security scans?

To ensure deterministic output for SARIF security scans, the skill enforces --metrics=off on every Semgrep invocation and writes results to an incrementing or user-specified OUTPUT_DIR, guaranteeing consistent and reproducible reporting across runs.

Are there limitations when merging multiple SARIF files into a single report?

When merging multiple SARIF files, a limitation occurs if SARIF Multitool is unavailable, triggering a pure-Python merge fallback. The skill handles this automatically to consolidate per-language security scan outputs into a single report.