triage-findings
Skill2 starsChanged 34 days agoApache-2.0View on GitHub
Decide whether a security finding is real — classify xgrep scan results as true or false positives by tracing dataflow from source to sink and mapping call chains with the code graph. Use to triage SAST findings before fixing, cut false positives, or confirm a vulnerability is exploitable.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- lklimek/claudiustheir own version, first seen Nov 5, 2026
- Anomity-ai/claude-plugintheir own version, first seen Oct 2, 2026
- Agenta-AI/agentatheir own version, first seen Jul 31, 2026
- BenjaminG/ai-skillstheir own version, first seen Jun 2, 2026
- zebbern/termstacktheir own version, first seen Apr 16, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- Agenta-AI/agenta★ 4.9ksame name
- BenjaminG/ai-skills★ 4same name
- zebbern/termstack★ 4same name
- lklimek/claudius★ 1same name
- Anomity-ai/claude-plugin★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- author-detectionsSkill
- fix-findingsSkill
- secure-ai-servicesSkill
- secure-cloudSkill
- secure-codingSkill
- secure-osSkill
- secure-pipelineSkill
- secure-saasSkill
- understand-codeSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 9 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 58
If you were handed a finding downloaded from the Mondoo console (<id>.fex.json, from the finding's Evidence card), reproduce it instead of …
- Distinctive: line 74
Before tracing dataflow, compare the stored excerpt with the source at that line:
- Distinctive: line 114
No sanitization on any code path between source and sink
- Distinctive: line 128
Always cite specific functions and line numbers as evidence.
- Very specific: line 132
Write the verdict back onto each finding as an extra.triage object (located by extra.fingerprint), then print a short human summary.
- Distinctive: line 164
Check every function in the path for sanitization
- Distinctive: line 165
Verify sanitization is correct for the specific context (SQL vs HTML vs shell)
- Distinctive: line 171
Check if authentication middleware is applied to all paths
- Distinctive: line 172
Look for alternative paths that bypass checks
- Distinctive: line 178
Check for logging, error messages, or API responses that include it
- Distinctive: line 179
Verify encryption/masking before external output
- Very specific: line 188
Use --depth 1 for focused context, --depth 2 for broader investigation
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Triage Findings
Decide whether each xgrep scan finding is real: build context with the code graph, trace dataflow from source to sink, check for validation/sanitization, and classify with evidence — so only genuine, exploitable issues move on to a fix.
When to Use
- Triaging scan findings from xgrep
- Checking a finding downloaded from the Mondoo console (
.fex.json) against the code - Investigating whether a finding is a true or false positive
- Understanding dataflow paths from sources to sinks
- Mapping attack surface via call chain analysis
When NOT to Use
- Creating or modifying detection rules (use
author-detections) - Running a scan without investigation (just use
xgrep scan -f rules.yaml --json target/)
Overview
This skill guides systematic investigation of xgrep findings. For each finding, you build context using the code graph, trace dataflow, check for validation/sanitization, and classify the result with evidence.
Workflow
Step 1: Scan the Target
# Uses built-in rules (600+ rules across 14 languages)
xgrep scan --json <target> > findings.json
# Or with custom rules
xgrep scan -f <rules-path> --json <target> > findings.jsonThe JSON output includes code context and remediation guidance for every finding. Parse it and group findings by:
- Severity (ERROR first)
- Rule ID (related findings together)
- File/function (use
context.functionfor grouping)
Present a summary: N findings across M rules, severity breakdown.
Key fields per finding:
extra.severity,extra.message,extra.lines— what was foundcontext.before/context.after— surrounding code for understandingcontext.function,context.callers,context.callees— call graph locationremediation.description— how to fix itremediation.has_autofix— whether autofix is available viaextra.fix
Step 1 (alternative): Start from a Mondoo finding document
If you were handed a finding downloaded from the Mondoo console (<id>.fex.json, from the
finding's Evidence card), reproduce it instead of scanning everything:
| What | Where in the document |
| Rule | ref (also details.properties.rule_id) |
| Location | details.properties.file, line, end_line, column, end_column |
| Code excerpt Mondoo stored at scan time | evidences[].file.contents |
| Repository and commit scanned | affects[].component.identifiers.url, affects[].component.properties.revision |
| xgrep build that produced it | details.properties.xgrep_version (when present) |
git -C <repo> checkout <revision>
xgrep scan --json --rule-id <ref> --include '<file>' <repo> > findings.jsonBefore tracing dataflow, compare the stored excerpt with the source at that line:
- Excerpt doesn't match the source, or doesn't show what the rule title describes (for example an eval-injection finding whose excerpt has no eval): the reported location is wrong, not your code. Classify it false positive and say so in the rationale. Include the document when reporting it to Mondoo.
- The re-scan no longer reports it at that commit: the xgrep that produced it differs from
yours (compare
xgrep_versionwithxgrep --version). Note both versions in the rationale. - It reproduces: continue with Step 2 on
findings.json.
Step 2: Investigate Each Finding
Note: The code graph is built automatically during the scan — every finding already includes context.function, context.callers, and context.callees. No separate xgrep graph build needed.
For each finding, starting with the highest severity:
Start with the built-in context — every finding already includes context.before/context.after (surrounding code), context.function (enclosing function), and context.callers/context.callees (immediate call graph). This is often enough for initial triage.
For deeper investigation, use graph commands:
# Full function context with N-hop neighborhood and inlined source
xgrep graph context <function-name> --depth 2
# Trace data path from entry point to dangerous sink
xgrep graph paths <entry-point> <dangerous-sink>
# Find all entry points for auth/access control findings
xgrep graph callers <handler-function>
# Map blast radius for data exposure findings
xgrep graph reachable <data-source-function>Step 3: Classify
Based on the evidence from Step 3:
True Positive:
- Untrusted data reaches a dangerous sink without adequate validation
- No sanitization on any code path between source and sink
- The sink is security-sensitive in context
False Positive:
- Input is validated/sanitized before reaching the sink
- The code path is unreachable from untrusted input
- The sink is not security-sensitive in this context
- Framework-level protection handles this case
Needs Review:
- Partial validation exists but may be incomplete or bypassable
- Complex control flow makes it hard to determine safety
- Framework-level protection may or may not apply
Always cite specific functions and line numbers as evidence.
Step 4: Record the verdict in findings.json
Write the verdict back onto each finding as an extra.triage object (located by
extra.fingerprint), then print a short human summary. The durable record is the
JSON — one artifact carrying detection, fix capability, and verdict — not the prose.
"extra": {
"...": "...",
"fix_info": { "kind": "assisted", "...": "..." }, // xgrep's "how" (untouched)
"triage": { // your "whether"
"reviewed": true,
"status": "true-positive", // | "false-positive" | "needs-review"
"rationale": "uid flows unsanitized into execute()",
"reviewed_by": "triage-findings",
"reviewed_at": "<RFC3339>"
}
}Edit the JSON in place (a small python/jq step keyed on fingerprint), leaving
every other field intact. Then xgrep fix apply --confirmed < findings.json (or the
fix-findings skill) fixes only the true-positive findings and skips false-positive
ones automatically. See triage-workflow.md
§6 for the write-back recipe and the summary-table format. Triage decides whether;
xgrep already decided how (extra.fix_info).
Investigation Patterns by Vulnerability Type
Injection (SQL, Command, XSS) -- CWE-89, CWE-78, CWE-79
- Identify the sink (SQL query, command execution, HTML output)
- Trace backwards:
xgrep graph callers <sink-function> - Find the entry point where user input enters
- Check every function in the path for sanitization
- Verify sanitization is correct for the specific context (SQL vs HTML vs shell)
Authentication/Authorization -- CWE-287, CWE-862
- Identify the protected resource or action
xgrep graph callers <handler>to find all entry points- Check if authentication middleware is applied to all paths
- Look for alternative paths that bypass checks
Sensitive Data Exposure -- CWE-200, CWE-532
- Identify where sensitive data is created or loaded
xgrep graph reachable <data-source>to see where it flows- Check for logging, error messages, or API responses that include it
- Verify encryption/masking before external output
References
- Code graph commands: graph-commands.md
- Detailed triage workflow: triage-workflow.md
Tips
- Use
--depth 1for focused context,--depth 2for broader investigation xgrep graph contextis the most useful single command -- topology and code in one shot- Confidence levels on edges:
certain(direct call),inferred(method on known type),uncertain(dynamic dispatch) - Function names can be partial matches (e.g.,
EvalRulematchesEvalRuleandEvalRuleWithContext) - For exact matches, use the full node ID:
pkg/core/eval.go::EvalRule
Part of the secure-your-stack toolkit
Triage sits between scan and fix: secure-pipeline produces the findings, this skill decides
which are real, and fix-findings remediates the confirmed ones. The secure-guard mod
surfaces high-confidence findings to the agent automatically as code is written.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

