Agent Skillsmtarcure/claude-vibe-squad › diff-aware-semgrep-scan

diff-aware-semgrep-scan

GitHub

针对代码变更运行 Semgrep 静态扫描,通过指定基线提交和规则包过滤历史误报,聚焦新引入的安全风险。涵盖源到汇路径分析、误报归因及覆盖率报告,确保在大规模遗留代码库中精准识别新增漏洞。

.agents/skills/diff-aware-semgrep-scan/SKILL.md mtarcure/claude-vibe-squad

触发场景

审查特定代码变更时的安全分析 需要区分新旧安全问题的静态扫描任务

安装

npx skills add mtarcure/claude-vibe-squad --skill diff-aware-semgrep-scan -g -y
更多选项

非标准路径

npx skills add https://github.com/mtarcure/claude-vibe-squad/tree/main/.agents/skills/diff-aware-semgrep-scan -g -y

不安装直接使用

npx skills use mtarcure/claude-vibe-squad@diff-aware-semgrep-scan

指定 Agent (Claude Code)

npx skills add mtarcure/claude-vibe-squad --skill diff-aware-semgrep-scan -a claude-code -g -y

安装 repo 全部 skill

npx skills add mtarcure/claude-vibe-squad --all -g -y

预览 repo 内 skill

npx skills add mtarcure/claude-vibe-squad --list

SKILL.md

Frontmatter
{
    "name": "diff-aware-semgrep-scan",
    "audience": "specialist",
    "description": "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

Scan only what changed, with the rules that matter for the change, so static-analysis signal survives contact with a large legacy baseline.

Steps

  1. Fix the comparison range (git diff --name-only <base>...HEAD) and collect changed files plus their language mix.
  2. Select rule packs by language and by change shape — auth, deserialization, templating, SQL, subprocess, crypto — rather than running one generic pack over everything.
  3. Run semgrep --config <packs> --baseline-commit <base> so pre-existing findings are suppressed and only newly-introduced ones surface.
  4. 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.
  5. Triage every hit against findings-filter: reachability from an untrusted source, attacker-controlled input, and real consequence.
  6. For each true positive, capture the rule id, the file:line, the data path from source to sink, and the minimal fix.
  7. For each false positive, record why the rule misfired; recurring misfires are input to semgrep-rule-author, not something to silence per-finding.
  8. 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.

版本历史

  • d5262e2 当前 2026-09-11 11:16

同 Skill 集合

.agents/skills/accessible-media-authoring/SKILL.md
.agents/skills/agent-prompt-engineering/SKILL.md
.agents/skills/agentic-safety-audit/SKILL.md
.agents/skills/audio-event-map-authoring/SKILL.md
.agents/skills/auto-scaffold/SKILL.md
.agents/skills/claim-verification/SKILL.md
.agents/skills/code-reachability-audit/SKILL.md
.agents/skills/code-review-loop/SKILL.md
.agents/skills/color-theory/SKILL.md
.agents/skills/conversation-design/SKILL.md
.agents/skills/copy-refinement/SKILL.md
.agents/skills/cross-file-relationship-synthesis/SKILL.md
.agents/skills/dependency-cycle-audit/SKILL.md
.agents/skills/dependency-health-triage/SKILL.md
.agents/skills/detection-as-code/SKILL.md
.agents/skills/differential-review/SKILL.md
.agents/skills/dimensional-analysis-check/SKILL.md
.agents/skills/dual-level-retrieval/SKILL.md
.agents/skills/figma-implement-design/SKILL.md
.agents/skills/forensic-timeline-authoring/SKILL.md
.agents/skills/game-design-fundamentals/SKILL.md
.agents/skills/game-mechanics-balancing/SKILL.md
.agents/skills/head-tail/SKILL.md
.agents/skills/incident-response-runbook/SKILL.md
.agents/skills/interactive-audio-design/SKILL.md
.agents/skills/interface-ambiguity-check/SKILL.md
.agents/skills/keyword-clustering/SKILL.md
.agents/skills/knowledge-base-integration/SKILL.md
.agents/skills/layered-analysis-loop/SKILL.md
.agents/skills/level-design-patterns/SKILL.md
.agents/skills/locale-adaptation/SKILL.md
.agents/skills/narrative-structure/SKILL.md
.agents/skills/platform-compliance/SKILL.md
.agents/skills/player-engagement-psychology/SKILL.md
.agents/skills/requirements-elicitation/SKILL.md
.agents/skills/rule6-rights-gate/SKILL.md
.agents/skills/rule8-truth-gate/SKILL.md
.agents/skills/sandbox-provision-discipline/SKILL.md
.agents/skills/scope-decomposition/SKILL.md
.agents/skills/scope-estimation/SKILL.md
.agents/skills/security-ownership-map/SKILL.md
.agents/skills/security-threat-model/SKILL.md
.agents/skills/semgrep-rule-author/SKILL.md
.agents/skills/skill-description-trigger-authoring/SKILL.md
.agents/skills/sound-design-principles/SKILL.md
.agents/skills/structured-data-authoring/SKILL.md
.agents/skills/supply-chain-audit/SKILL.md
.agents/skills/take-over-resume/SKILL.md
.agents/skills/technical-seo-audit/SKILL.md

元信息

文件数
0
版本
d5262e2
Hash
9381fe20
收录时间
2026-09-11 11:16

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-12 15:31
浙ICP备14020137号-1 $访客地图$