Safeguard
Developer Tools•

Why SAST produces false positives and how to cut them down

SAST false positives come from limited context, not bad luck. Start with a few rule categories, tune on one repo, and track the fix rate to cut them.

Safeguard Security Team
3 min read

SAST produces false positives because it reasons about code without running it, so it cannot always tell whether input is already sanitised or whether a path is reachable. You reduce them by starting with a small set of high confidence rules, tuning on one repository, and measuring how many findings developers actually fix.

Why the tool guesses

OWASP lists high numbers of false positives among the limitations of source code analysis tools, and says it is difficult to prove that a flagged issue is an actual vulnerability. A static tool follows data flow through what it can see. It may not know that a custom function validates input, that a framework escapes output automatically, or that a branch is dead code. When it cannot be sure, it reports.

Build problems add to this. OWASP notes many tools struggle with code that cannot be compiled, which usually needs the right libraries and build instructions.

Steps that reduce noise

  1. Start narrow. Enable a few rule categories with clear impact, such as injection, and leave the rest off for now.
  2. Tune on one repository. Pick a service the team knows well. Review every finding with the owner and record which rules were wrong.
  3. Teach the tool your helpers. If you have an input validation function or a templating layer, many tools let you mark it as a sanitiser.
  4. Make the build clean. Give the scanner what it needs to compile, so analysis is complete.
  5. Suppress with a reason. Allow a documented suppression that records who decided and why, and review suppressions on a schedule.
  6. Scan changes, not everything. Report findings in the diff so authors see only what they introduced.

Measure what matters

Do not count findings. Count outcomes.

  • Fix rate: the share of reported findings that developers change code for.
  • Time to fix.
  • Suppression rate by rule. A rule suppressed nearly every time should be retired or rewritten.

If the fix rate is low, developers have decided the tool is noise, and trust is hard to win back.

Do not skip the true positives

Cutting noise should not drift into ignoring real issues. Keep a small sample of past genuine bugs and check that your tuned setup still catches them.

Where SAST fits among other scanners

Because SAST misses much and flags too much, pair it with other checks: dependency scanning for known library flaws, and testing for access control. See SAST vs SCA.

Click through it at your own pace, or open it full screen.

Quick check

What is the best single metric for SAST health?

The share of findings developers fix. It shows whether the output is trusted and useful.

Should we suppress a noisy rule globally?

If it is almost always wrong in your codebase, yes, with a note explaining why. Revisit it later.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.