Why SAST Alerts Fail—and How the CodeQL Bounty Program Fixes That
Static application security testing (SAST) tools only deliver value when their alerts drive efficient fixes and encourage secure coding habits without burdening developers. Research published in "What Developers Want and Need from Program Analysis: An Empirical Study" identifies five recurring frustrations with SAST output: irrelevant default checks, false positives, poor workflow integration, unclear messages, and missing suggested fixes.
The GitHub Security Lab’s CodeQL bounty program is one attempt to tackle these problems directly. It recruits open source contributors to write CodeQL queries that feed GitHub Advanced Security (GHAS), with each submission judged on how well it addresses the pain points developers actually experience.
Queries Are Held to a High Bar
Every query submitted to the bounty program must prove it can detect one or more past common vulnerabilities and exposures (CVEs) and identify the same vulnerability pattern across several active open source projects. That dual requirement ensures community contributions aren't just retrofitted to individual CVEs but also catch repeatable, real-world vulnerability patterns.
The GitHub Security Lab’s security research team then triages each submission. Researchers work with the submitter to refine the query, sometimes broadening what it detects, sometimes tightening it to focus on the most impactful results. The goal is to target the most severe and frequently occurring vulnerabilities—over the past 12 months alone, 25 bounty-proposed queries have flagged high or critical severity CVEs, including an improper verification of cryptographic signature caught by a community-written query.
Working With the Developer's Workflow
GHAS surfaces security alerts as reviews within pull requests. Developers see them the same way they'd see comments from a human reviewer—in the same interface and at the same point in the process. No extra tool, no additional phase.
That integration matters less if the alerts aren't trustworthy. The bounty program weights five factors equally when assessing rewards:
- Vulnerability severity
- Vulnerability scope
- False positive rate
- Code quality
- Documentation quality
Submissions only get accepted if they show an acceptable false positive rate, and only those with high or very-high precision metadata are promoted to the standard query set—the one that runs by default with GitHub code scanning and issues alerts inside pull requests.
Precision work continues after evaluation as well. The GitHub CodeQL team keeps refining accepted queries, and there's even a separate reward track for community members who propose ways to eliminate false positives from existing queries.
Developers Can Modify the Queries Themselves
No query set can be perfect in every context, and a true positive in general may be a false positive in your environment. Since CodeQL queries are code, a developer can modify one to permanently suppress a false positive. This only works practically if the queries are readable, which is why code quality carries weight in the bounty evaluation. The CodeQL team reviews submissions against a strict set of requirements to keep the standard set maintainable, and continues improving queries after acceptance so others can read and adapt them.

Messages That Explain, Not Just Report
Shifting left with secure coding practices requires more than throwing alerts at developers. They need to understand the problem and take ownership of the security requirement going forward.
CodeQL alerts ship with built-in documentation offering an explanation of the vulnerability, its impact, remediation steps, secure coding best practices, and references. This documentation—not a link to an external page—appears directly in the alert within the pull request, so developers can read the guidance exactly where they'll write the fix.

Organizations with their own security guidance aren't locked into the default text. Application security teams can customize the query help to point at internal references or education material tailored to their development context.
Community Input With Guardrails
The bounty program channels open source energy toward queries that find meaningful vulnerabilities, maintain high precision, meet quality standards, and educate developers alongside alerting them. Those requirements are what make it possible to fold GHAS into a team's software development lifecycle without the usual SAST overhead.



