Static analysis programmes rarely fail because the scanner misses bugs: they fail because developers drown in unreviewed findings, start ignoring the tool, and real vulnerabilities sit beside thousands of false positives. Triage is the discipline that turns raw SAST output into a short list of trusted, owned issues. This guide covers how to tune rule sets, baseline legacy findings, record suppressions so they survive audit, use SARIF fingerprints and suppression fields to keep results stable across runs, and measure whether triage is working. It is written for application security engineers, security champions and platform teams running SAST in CI, and complements the Alert Triage Guide, which covers SOC alert handling rather than code findings.
Key takeaways
- Start narrow and widen deliberately. High-precision rules on new code earn developer trust; broader rule sets come later, with a triage owner ready for the extra noise.
- Baseline, do not bulk-dismiss. Separate legacy findings from new ones so pull requests only show what the change introduced, and work the legacy backlog by risk.
- Every suppression needs a reason, an author and a review status. SARIF 2.1.0 defines suppression kind, status and justification fields for exactly this.
- Stable identity is a prerequisite. Fingerprints, consistent rule IDs and consistent file paths stop the same issue reappearing as a "new" finding after refactors or tool upgrades.
- Feed false positives back into rules. A false positive dismissed once is a cost; a rule fixed once removes that cost for every repository.
Why triage is where SAST programmes fail
SAST tools trade precision for recall. Data flow analysis that follows tainted input through frameworks, reflection and custom sanitisers will sometimes report a flow that cannot happen, and pattern rules flag code that only looks dangerous. Vendors know this and grade their own rules. GitHub's CodeQL ships three built-in query suites: default, whose queries GitHub describes as highly precise with few false positives; security-extended, which adds queries of slightly lower precision and severity and may return more false positives; and security-and-quality, which adds maintainability and reliability queries and is only available with advanced setup. Choosing the suite is the first triage decision, because it sets the volume every later step must absorb.
Three things make SAST noise worse than it needs to be: running every rule against every repository on day one, presenting the entire historical backlog in every pull request, and handling false positives one alert at a time instead of fixing the rule or the model of the code. The rest of this guide addresses each.
Triage outcomes and what each should mean
Agree a fixed set of outcomes across tools so metrics are comparable. GitHub's code scanning REST API, for example, accepts these dismissal reasons when an alert's state is set to dismissed: false positive, won't fix, used in tests and mitigated, and a reason is required for dismissal. Semgrep's platform moves findings to an Ignored triage state with an optional ignore reason. Map tool-specific states onto one internal vocabulary.
| Outcome | Meaning | Evidence required | Review |
|---|---|---|---|
| True positive, fix | Exploitable or plausibly exploitable flaw | Ticket with severity and owner under the bug bar | Closed when the fix is verified by a rescan |
| False positive | The reported flow or pattern cannot occur | Why: sanitiser not modelled, unreachable path, constant input | Feeds a rule or model fix; sample audited |
| Mitigated | Flaw is real but a compensating control blocks it | Name and location of the control | Re-review if the control changes; time limited |
| Used in tests | Code exists only in tests or fixtures | Path proves it is not shipped | Prefer path exclusion over repeated dismissal |
| Accepted risk (won't fix) | Real and unmitigated; business accepts it | Risk owner, expiry date, exception reference | Formal exception process, not developer choice |
| Needs review | Triager cannot decide | Question for the code owner | Time box, then escalate |
The important split is between false positive (the tool is wrong) and accepted risk (the tool is right and we chose not to fix). Mixing them hides real exposure in a "noise" bucket. Accepted risk belongs in the vulnerability exception process. See the Remediation SLAs and Vulnerability Exceptions Guide.
Baselines: separating legacy findings from new ones
A baseline is a snapshot of existing findings that new scans are compared against, so a pull request is judged only on what it introduced. SARIF 2.1.0, the OASIS standard format most SAST tools can emit, defines a baselineState property on each result with four values: new, unchanged, updated and absent. Platforms implement the same idea in their own ways, so check how yours compares pull request results with the default branch.
- Capture the baseline on the default branch with the rule set you intend to keep. Changing rules later changes the baseline.
- Gate only on new findings in pull requests, starting with high and critical severity from high-precision rules.
- Treat the baseline as a backlog, not an amnesty. Rank legacy findings by severity, reachability (internet-facing code first) and data sensitivity, and schedule them into normal work.
- Burn down by rule, not by file. Fixing every instance of one rule in one change (for example replacing a string-built query helper) is cheaper than fixing mixed findings file by file, and it often removes a whole class.
- Re-baseline only on purpose: after a tool or rule-set upgrade, compare old and new results and review what moved from
absenttonewbefore accepting the new baseline.
Suppressions that survive audit
SAST suppressions come in two forms, and SARIF names both. The suppression object has a kind of inSource (an annotation in the code) or external (recorded outside the code, for example in the platform), a status of accepted, underReview or rejected, and a free-text justification. Those three fields are a good minimum for any suppression record, whatever tool you use.
| Approach | Example | Strengths | Risks and controls |
|---|---|---|---|
| Inline annotation | Semgrep // nosemgrep: rule-id on or before the matching line | Visible in code review; travels with the code | Developers can silence findings themselves. Semgrep requires an admin to enable "Allow inline comments to disable Semgrep"; require a reviewer from security or a champion for any change that adds one, and always name the rule ID rather than a bare nosemgrep |
| Platform dismissal | GitHub code scanning dismissal with reason and comment | Central audit trail; the comment is added to the alert timeline and exposed through the API as dismissed_comment | GitHub notes a dismissed alert is dismissed in all branches. Restrict who may dismiss (GitHub documents delegated alert dismissal and dismissal requests) and sample dismissals monthly |
| Path exclusion | .semgrepignore, CodeQL configuration paths | Removes whole classes of noise (generated code, vendored code) | Silent and broad. Semgrep's default ignore template excludes test paths such as tests/ and *_test.go as well as vendor/ and node_modules/; confirm those defaults match what you ship |
| Rule or model change | Mark a custom sanitiser, tighten a pattern, disable a rule | Fixes the cause for every repository | Needs rule ownership and regression tests against known true positives |
- Write justifications a stranger can check: "input is an integer from the route parser, see
OrderController.csline 40" beats "not exploitable". - Expire risk-based suppressions: mitigated and accepted-risk outcomes should carry a review date. False positives tied to a rule bug should close when the rule is fixed.
- Check that suppressions do not hide new code: a broad inline ignore on a function stays in place when someone adds a new sink to that function.
- Do not let AI fix suggestions bypass triage: GitHub states that Copilot Autofix is not guaranteed to succeed every time and that agentic autofix validation is best effort; review generated fixes like any other change. See the AI-Assisted Code Review and AI SAST Guide.
SARIF workflows and stable result identity
Most triage pain after the first month comes from findings losing their identity: a file is moved, a tool is upgraded, or two tools report the same issue, and suppressed results reappear as new. SARIF addresses this with two properties on each result: fingerprints, where each value individually defines a stable unique identity, and partialFingerprints, a set of values that together contribute to that identity. Platforms use these differently, so check the one you upload to.
- GitHub code scanning: supports SARIF 2.1.0 only, uses the
partialFingerprintsproperty and specifically only theprimaryLocationLineHashvalue to detect logically identical results, and tries to compute it from source when an upload lacks it. GitHub warns that uploads through the/code-scanning/sarifsendpoint without fingerprints may produce duplicate alerts. - Keep rule IDs stable: GitHub requires the same
ruleIdacross analyses; renaming rules in a custom pack creates new alerts and closes old ones. - Keep paths stable: GitHub notes that if a file path changes, a new alert is created and the old one is closed. Run analysis from a consistent checkout root and avoid build-specific absolute paths.
- Carry severity in the rule: GitHub reads
properties.security-severity(over 9.0 critical, 7.0 to 8.9 high, 4.0 to 6.9 medium, 0.1 to 3.9 low) andproperties.precision(very-high,high,medium,low). Use precision in gating: block pull requests on high-severity, high-precision rules and route lower-precision rules to a triage queue. - Watch upload limits: GitHub accepts up to 10 MB per gzip-compressed SARIF file and up to 25,000 results per run, of which only the top 5,000 by severity are included. A noisy tool can push real findings out of view.
- Normalise across tools: when several SAST tools run, deduplicate on CWE plus sink location before triage, and record which tools agree. Agreement is a useful confidence signal but not proof.
Running the triage process
Who triages
Small teams usually have developers triage their own pull request findings, with an application security engineer reviewing dismissals weekly. Larger organisations get better consistency from a central triage rota for the legacy backlog and new rules, with security champions handling pull request findings in their teams. Either way, the person who dismisses should not be the only person who ever sees the dismissal.
A triage decision sequence
- Confirm the source: is the input attacker-controlled in practice (HTTP request, message queue, file upload) or internal and constant?
- Follow the path: is there a validation, encoding or parameterisation step the tool did not model? If yes, it is a false positive caused by a missing model, so raise a rule fix.
- Confirm the sink: is the sink actually dangerous in this context (for example a query builder that parameterises by default)?
- Check reachability: is the code shipped, routed and reachable by an unauthenticated or low-privilege user?
- Decide and record using the outcome vocabulary, with a justification, then raise a ticket with severity from the bug bar for true positives.
Tuning loop
Review false positive dismissals by rule every month. Rules with a high false positive share either get fixed (add the sanitiser model, tighten the pattern), moved to a lower-precision non-blocking tier, or disabled with a recorded reason. Before changing a rule, keep a small corpus of known true positives for it so the change does not silently remove real detections. OWASP Benchmark offers a public example of this kind of measurement: its scorecards count true and false positives and negatives and report a score based on the Youden index, true positive rate minus false positive rate.
Where identity fits
Two identity issues show up in SAST triage. First, hard-coded credentials, API keys and tokens are often flagged by SAST rules but belong in secret scanning with revocation, not in code triage: a dismissed hard-coded key is still a live key. Route those findings to the secrets process and rotate before closing. See the Git Secret Scanning Guide. Second, the CI tokens that upload SARIF and the accounts allowed to dismiss alerts are privileged: an attacker or careless automation with dismissal rights can hide findings. Scope upload tokens to the repository, separate upload rights from dismissal rights, and log dismissals. See the CI/CD Pipeline Identity Security Guide.
Measuring triage health
| Metric | How to measure | What good looks like |
|---|---|---|
| Untriaged age | Median days a new finding waits for an outcome | Days, not weeks, for high severity |
| False positive share by rule | False positive dismissals divided by all outcomes, per rule | Falling for rules you tune; outliers fixed or demoted |
| Dismissal audit pass rate | Monthly sample of dismissals re-reviewed by a second person | High agreement; disagreements drive training |
| New-in-PR fix rate | Share of pull request findings fixed before merge | Rising as trust in the gate grows |
| Legacy backlog burn-down | Open baseline findings by severity over time | Steady decline, criticals first |
| Escapes | Vulnerabilities found by pentest, bug bounty or incident in code where a SAST finding was dismissed | Zero; each escape triggers a review of the dismissal and the rule |
Framework mapping
| Framework | Reference | Relevance to SAST triage |
|---|---|---|
| NIST SP 800-53 Rev. 5 | SA-11(1) Static Code Analysis | Requires developers to use static analysis and document the results |
| NIST SP 800-53 Rev. 5 | SA-15(7) Automated Vulnerability Analysis; SI-2 Flaw Remediation | Analysis outputs feed tracked remediation |
| NIST SP 800-53 Rev. 5 | RA-7 Risk Response; SA-11(4) Manual Code Reviews | Accepted-risk outcomes and human review of disputed findings |
| NIST CSF 2.0 | ID.RA-01; ID.RA-06; PR.PS-06 | Vulnerabilities validated and recorded; responses tracked; secure development monitored |
| OASIS SARIF 2.1.0 | result.baselineState; result.suppressions; fingerprints | Interchange fields for baselines, suppressions and stable identity |
Common failure patterns
- Turning on everything at once: the broadest suite on every repository on day one produces a backlog nobody reads, and developers learn to ignore the tool.
- Bulk dismissing the backlog as "won't fix": bulk dismissal is a supported feature, which makes it easy to erase real findings. Baseline instead, and keep accepted risk inside the exception process.
- Bare inline ignores: a
nosemgrepwithout a rule ID or justification silences every rule on that line, including rules added next year. - Default path exclusions nobody reviewed: test and vendor folders excluded by default may contain code that ships, such as test helpers imported by production modules.
- Losing identity on refactor: unstable paths or rule IDs make suppressed findings return as new, and teams respond by suppressing more broadly.
- Closing hard-coded secrets as false positives because "it is only a test key", without checking whether the key works anywhere.
Practitioner checklist
- Pick a high-precision starting rule set and document when broader suites will be added.
- Define one triage outcome vocabulary and map each tool's states to it.
- Baseline the default branch and gate pull requests only on new high-severity, high-precision findings.
- Require a rule ID and justification for every inline suppression, and reviewer approval to add one.
- Restrict dismissal rights, separate them from SARIF upload rights, and audit a sample of dismissals monthly.
- Route accepted-risk outcomes into the vulnerability exception process with an owner and expiry.
- Emit SARIF 2.1.0 with fingerprints, stable rule IDs and stable relative paths.
- Review false positive rates per rule monthly and fix, demote or disable noisy rules with a recorded reason.
- Send hard-coded credential findings to the secrets process and rotate before closing.
- Track untriaged age, false positive share, backlog burn-down and escapes.
Standards and references
- OASIS SARIF TC: SARIF 2.1.0 JSON schema
- GitHub Docs: SARIF support for code scanning
- GitHub Docs: Resolving code scanning alerts
- GitHub Docs: CodeQL query suites
- GitHub Docs: REST API endpoints for code scanning
- Semgrep: Ignore files, folders and code
- OWASP: Benchmark project
- NIST: SP 800-53 Rev. 5
Related NHI Mgmt Group resources: CodeQL Guide · Secure Code Review Guide · DevSecOps Guide · Alert Triage Guide