/appsec-skills:semgrep-triagefrom appsec-skills
Triages Semgrep (or other SAST) findings by tracing flagged values to sources, checking controls against a wiki, and producing a Markdown report with source-to-sink diagrams and reproduction steps.
Ships in appsec-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Turn scanner findings into decisions the user can check. Every verdict is backed by a source-to-sink trace, the wiki's controls and bypasses for the stack, and steps the user can repeat by hand. The report explains why, so the reader learns the pattern, not just the answer.
semgrep.json), or run Semgrep if the user asks
(semgrep scan --config <config> --json --json-output=semgrep.json). Other SAST JSON works if it has
a rule id, a file and a line per finding.docs/triage/semgrep-triage.md.--learn (optional): learn mode, see the end of this file.${CLAUDE_PLUGIN_ROOT}/skills/semgrep-triage/references/report-template.md: the report format,
severity rubric and rule decision guide. Read it before writing the report.${CLAUDE_PLUGIN_ROOT}/skills/semgrep-triage/scripts/triage.mjs: findings, embed and check.
Run it from the repo root.${CLAUDE_PLUGIN_ROOT}/skills/source-to-sink/: builds the traces (see step 3).${CLAUDE_PLUGIN_ROOT}/wiki/docs/threats/<category>/<threat>.md (When is it relevant,
Attack, Mitigation) and ${CLAUDE_PLUGIN_ROOT}/wiki/examples/<threat>/<stack>.md
(Mitigation options, Bypasses to check, What to grep for).file:line with the code quoted. If something can't be
confirmed from the code, say so and lower the confidence. Never guess.node ${CLAUDE_PLUGIN_ROOT}/skills/semgrep-triage/scripts/triage.mjs findings semgrep.json: the rule
ids, locations, Semgrep severity and metadata (impact, likelihood, confidence, CWE).express, pg, ejs, node).docs/flows/*.flow.json (walkthroughs: routes, gates, captured requests) and
docs/traces/*.trace.json (traces whose sink card is at a finding's location).From the rule id, message, CWE and the flagged code, pick the wiki threat page
(threats/source-to-sink/* for injection-style sinks, threats/business-logic/* for missing controls).
List the category folders to see what exists. Then read only the example file for the project's
stack (examples/<threat>/<stack>.md), one threat at a time, never the whole examples/ tree. If no
file matches the stack, use the page's stack-agnostic Mitigation checklist and say so.
Decide whether the finding is a dataflow finding (a value reaches a sink) or not (the rule checks configuration, a missing library, a setting). Only dataflow findings get a trace.
For each dataflow finding without an existing trace, invoke the source-to-sink skill in
backward mode once, for all of them together (appsec-skills:source-to-sink), and follow it: one
trace per finding, chained in finding order, built and checked with its generator. Trace past the
flagged line when the real sink is later (Semgrep may flag path.join, while the file is read in
fs.createReadStream one call later). The trace gives you the report's Inputs reaching it and
Controls on the path.
For each finding:
greps that find each hop, the tour,
and the requests with seeded test credentials.report-template.md, with a <!-- trace: <id> --> line in each
dataflow finding's Source-to-sink trace section.node ${CLAUDE_PLUGIN_ROOT}/skills/semgrep-triage/scripts/triage.mjs embed docs/triage/semgrep-triage.md
inserts each trace's diagram from docs/traces/<id>.md.node ${CLAUDE_PLUGIN_ROOT}/skills/semgrep-triage/scripts/triage.mjs check docs/triage/semgrep-triage.md
and fix everything it reports (missing sections, tables, missing tours).Tell the user: the summary list (verdicts, severities, rule decisions), which findings to fix first and their suggested fixes (and whether each was tested on a scratch copy), where the report, traces and tours are, which evidence was observed and which derived, and the assumptions (sign-up, stack). Remind them to report real findings through their security process.
--learn)For users building triage skills. Do steps 1–3 as usual, then for each finding, before deciding:
Write the report as usual, and add a **Your call:** bullet under each finding's header list
recording what they answered.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub mohamed-osama-aboelkheir/appsec-untangled-resources --plugin appsec-skills6 skills in this plugin
/code-walkthroughExplain how a feature or a code location works as a numbered walkthrough: a Mermaid sequence diagram (UI → HTTP → app → route → auth → controller → service → store → database) and a matching VS Code CodeTour whose steps highlight the exact code, with real request/response and error examples. Starts from a route, a feature, or a code location such as a SAST/Semgrep finding's sink, and finds the routes that reach it. Use when asked to walk through, trace, diagram, explain or "code tour" a flow, route, feature or finding./secure-code-reviewThreat-model-first security code review of a pull request, commit or diff. Builds the story of the change, lists entry points and dangerous sinks, picks the relevant threats from the AppSec Untangled wiki, checks each mitigation against the code, and writes Markdown and HTML reports with evidence. Use when asked for a security review of a PR, commit, branch or diff./security-experimentBuild a short, runnable notebook that shows why a security control makes a sink safe (or why its absence doesn't): one classic payload goes through the application's real steps, first without the control, then with it, printing the value after every step with the dangerous part highlighted, until the payload disappears (or reaches the sink). Works for sanitisers, encoders, validators, allowlists, parameterised queries and path checks. Use when asked why a finding is a false positive, to prove or demonstrate a control, to show what a sanitiser removes, or to "experiment" with a payload against the code./source-to-sinkTrace how data flows between sources and dangerous sinks, like a SAST dataflow trace, and explain it as a diagram of code cards plus a VS Code CodeTour that highlights the value on every line. Backward mode starts from a sink (a file:line, or a Semgrep/SAST finding) and finds every source that reaches it and whether it is user input, and which users can send it. Forward mode starts from an input (a parameter, header, body field, or all inputs of a route) and finds every dangerous sink it reaches, or where it stops. Use when asked what reaches a sink, whether a finding's input is user-controlled, where an input goes, or for a source-to-sink / taint / dataflow trace./threat-modelBuilds a threat model with the Doors, Windows & Holes method from the AppSec Untangled wiki, for a design doc, a feature description, an architecture or a repository. Writes the problem and stories, answers the template's scope questions, groups doors (entry points), windows (hidden entry points) and holes (dangerous sinks), adds business-logic and source-to-sink threats with shared mitigations, and ends with a testing plan of point-in-time and continuous tests per mitigation. Runs in four stages with a user review after each (stories, doors/windows/holes, threats and mitigations, tests) unless asked for one shot. Outputs Markdown and JSON, and can fill the Notion threat model template. Use when asked to threat model a system, feature, design or repo.