diff-aware-semgrep-scan
БесплатноБез исполняемых скриптовНе проверенUse when reviewing a particular code change against a large pre-existing Semgrep baseline: fix the base commit, choose rules by language and change shape…
от lza6★ 19 звёзд на GitHubОб этом скилле
Diff-Aware Semgrep Scan
Scan only what changed, with the rules that matter for the change, so static-analysis signal survives contact with a large legacy baseline.
Steps
- Fix the comparison range (
git diff --name-only <base>...HEAD) and collect changed files plus their language mix. - Select rule packs by language and by change shape — auth, deserialization, templating, SQL, subprocess, crypto — rather than running one generic pack over everything.
- Run
semgrep --config <packs> --baseline-commit <base>so pre-existing findings are suppressed and only newly-introduced ones surface. - Re-run without the baseline flag on the changed files alone when a finding's history matters; a pre-existing issue in a file the change now exposes to untrusted input is a new risk even though the line is old.
- Triage every hit against
findings-filter: reachability from an untrusted source, attacker-controlled input, and real consequence. - For each true positive, capture the rule id, the file:line, the data path from source to sink, and the minimal fix.
- For each false positive, record why the rule misfired; recurring misfires are input to
semgrep-rule-author, not something to silence per-finding. - Report scan coverage honestly: files skipped for parse errors or unsupported languages are gaps, not passes.
Acceptance
- The scan states its base commit and the rule packs selected, with a reason for the selection.
- Newly-introduced findings are separated from pre-existing ones.
- Every reported finding has a source-to-sink path, not just a rule match.
- False positives are explained, and repeat offenders are routed to rule authoring.
- Unscanned or unparsed files are listed as coverage gaps.
Установить diff-aware-semgrep-scan в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл diff-aware-semgrep-scan?
Use when reviewing a particular code change against a large pre-existing Semgrep baseline: fix the base commit, choose rules by language and change shape, surface new or newly exposed source-to-sink paths, and report parse or coverage gaps. Route recurring false positives to semgrep-rule-author.
Как установить скилл diff-aware-semgrep-scan?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл diff-aware-semgrep-scan запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic