STAYCHARTED BLOG · SECURITY · VULNERABILITY MANAGEMENT
How to cut SAST false positive triage time with your team's own dismissals
Your team has already dismissed thousands of static analysis findings. Train on those decisions to flag likely false positives, and check the unsure ones.
Your dismissals are the training data
Most code scanning tools record why a finding was closed. GitHub code scanning, for example, asks for a reason when someone dismisses an alert: false positive, used in tests, or won't fix. Dependabot alerts have their own reasons, such as "risk is tolerable" or "vulnerable code is not actually used". Check which statuses and reasons your own scanner exports.
Export those closed findings, with the reason, and you have months of labeled examples. Review those labels before training: accepted risk and false positive are different outcomes, and past decisions may need updating.
What the model reads, and what it answers
It reads what a reviewer looks at:
| Field | Example |
|---|---|
| Rule ID and name | java/sql-injection · "Query built from user-controlled sources" |
| Message | The tool's explanation |
| File path | src/test/java/... or src/main/java/... |
| Code snippet | The flagged lines and a few around them |
| Language and repository | Java · payments-api |
It answers with the reasons your team uses, for example:
- Likely real: fix
- Likely false positive
- Test code only
- Won't fix (accepted)
Every answer comes with a confidence.
A code snippet is text to this classifier. It does not execute code, trace data flow or verify exploitability. Restrict uploads to code your organization permits you to share.
How to set it up
- Export closed findings from the last 6 to 12 months, with the fields above and the dismissal reason or "fixed". Keep findings that were fixed: they're your "real" examples.
- Remove secrets and sensitive code first. If a snippet contains a credential, even a test one, cut it or replace it with a placeholder.
- Train an AI Classifier Model. The report shows, for each reason, how often the model agreed with your team on findings it never saw.
- Fill new findings each week, or through the API as they arrive.
- Sort by confidence. Confident "test code only" and "false positive" suggestions get a quick look. Everything else, and every "likely real", gets the full review it always did.
- Review and retrain. On Essentials and Business, unsure findings wait in the Review Queue. Your engineers' answers teach the next version. How review and retraining work →
Keep these rules
- Never auto-dismiss. A suggestion of "false positive" speeds up the check; a person still closes the finding. A missed real vulnerability costs far more than the minutes saved.
- Watch the rules your team rarely sees. A rule with only a handful of past dismissals won't be learned well. The report's per-category numbers show where.
- Retrain when your code or tools change. A new framework, a new rule pack or a new scanner version changes what findings look like.
- Known exploited and critical findings always get an analyst review, regardless of confidence. Configure that override in your workflow. Check a sample of confident suggestions too.
Code privacy
Code snippets are sensitive. Your findings train only your model (Security →). On Business, you can train the Dedicated AI Model in your own Amazon Bedrock, Microsoft Foundry or Google Cloud account, so the training happens in your cloud. Your labeled rows still pass through and are stored in StayCharted; this is not a promise that data never leaves your systems. Train in your own cloud →
Common questions
How do you reduce false positives in static analysis?
Tune the rules first: turn off rules that don't apply and mark test paths. For what's left, a model trained on your past dismissals can flag likely false positives, so engineers check those quickly and spend their time on the findings that look real.
Can AI automatically dismiss SAST findings?
It can suggest, and it shouldn't dismiss on its own. Use the suggestion and its confidence to order the review.
Does this work for Dependabot or other dependency alerts?
Yes. Dependency alerts have their own dismissal reasons, such as "vulnerable code is not actually used". Train on those, with the package, the advisory and the manifest path.
Which tools does it work with?
Any tool that can export findings with a status or reason, as a CSV or through its API. StayCharted doesn't connect to the scanner itself; you send it the findings.
How many past findings do we need?
A few hundred per reason is a good start. The report shows which reasons need more.