Freedom251 › Static Application Security Testing Sast
Flawfinder

What Flawfinder is
Flawfinder examines C and C++ source code for potential security weaknesses. It compares source text with a built-in database of functions associated with security problems, generally skipping comments and strings except where Flawfinder directives apply. Findings are ordered by risk, which reflects the function and its parameter values; the tool may lower some false positives when it can identify a construct as non-risky. Reports are available in text, HTML, CSV, and SARIF formats. The `--patch` option limits findings to changed lines in a unified diff, with a one-line margin. Flawfinder is free under GPL-2.0+ and requires Python 2.7 or Python 3; installation options include pip, source downloads, and distribution packages. It works on Unix-like systems, including GNU/Linux, and Windows use is documented through Cygwin, with direct Windows use also reported to work. It does not perform control-flow or data-flow analysis, so its results are not a substitute for security expertise or human review.
Who it suits
Flawfinder suits developers looking for potential security problems in C/C++ application source before release. It can help focus review, but its findings need human judgment.
What it does well
- Free to use under GPL-2.0+.
- Reports in text, HTML, CSV, and SARIF.
- Patch option narrows findings to changed lines.
- Installation options include pip and distribution packages.
What to know first
- Does not perform control-flow or data-flow analysis.
- Some hits are not vulnerabilities; some vulnerabilities may be missed.
- Requires Python 2.7 or Python 3.
Limits
Flawfinder has no paid-plan boundary, but its analysis stops short of control-flow and data-flow analysis. It can produce false-positive hits and miss vulnerabilities, so findings require review.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| Flawfinder | Free for anyone to use · GPL-2.0+ open source | Free |
As dwheeler.com lists them, read 4 Oct 2026. The maker's own page has the final word.
Getting started
- Visit the Flawfinder website.
- Install it with pip, download the source directly, or use a distribution package.
- Make a copy of the source code you plan to analyze.
- Run Flawfinder on the C or C++ source; use the patch option to focus on changed lines if needed.
- Choose text, HTML, CSV, or SARIF output for the report.
Flawfinder is a free C/C++ source scanner for developers who want a focused security check before release. Its risk-ranked findings and patch option make it a practical aid to review, but its pattern matching cannot establish that code is safe.
Overview
Flawfinder compares source text with a built-in database of C/C++ functions associated with security problems. It ignores comments and strings except for Flawfinder directives, then ranks hits according to the function and its parameter values. It can reduce some false positives when it recognizes that a construct is not risky, but each finding still needs human judgment.
The key trade-off is limited analysis depth: Flawfinder does not trace control flow or data flow. Some hits are not vulnerabilities, while some vulnerabilities may not be found. Developers who need a focused way to surface potentially risky patterns can benefit; teams looking for a comprehensive security assessment should use it only as one part of a broader review.
Key features
- Risk-ranked hits: Prioritization gives reviewers a sensible order in which to investigate findings, without treating the ranking as proof of exploitability.
- Multiple report formats: Text and HTML support direct review, while CSV and SARIF can suit tool-oriented workflows. CSV is described as useful for integration; SARIF output is in JSON format.
- Patch-focused review: The --patch option limits hits to lines related to changes in a unified diff, including a one-line margin. That helps focus a review on a patch, though it does not assess the surrounding program’s full behavior.
- Open-source distribution: Flawfinder uses GPL-2.0+ and has a CII Best Practices passing badge; the project describes it as CWE-compatible.
Installation is documented through pip, direct source download, and distribution packages, and requires Python 2.7 or Python 3. For safe handling, analyze a copy of source code and do not load or diff hitlists from untrusted sources: hitlists use Python pickle. General questions go to the project mailing list, while bug reports and feature requests go to git or the SourceForge issue tracker.
Pricing
Flawfinder — free. The plan is free for anyone to use and is GPL-2.0+ open source. There is no separate paid tier or free-trial period to weigh; the tool is intended for source-code analysis.
Platforms
Flawfinder is intended for Unix-like systems, including tested GNU/Linux, and can run on Windows through Cygwin. Direct Windows use has also been reported to work. The project documents installation routes for these environments, though Windows users may find the Cygwin route the clearer supported path.
Who it's for
Flawfinder suits developers reviewing C/C++ application source for potential security problems before release, especially when a free, focused scanner and patch-level output are useful. It is not the right standalone choice for readers who need control-flow or data-flow analysis, or who expect automated findings to replace security expertise and human review. David A. Wheeler says he created and has maintained the tool since 2001.
Pros and cons
Pros
- Free and open source: The GPL-2.0+ plan makes it available to anyone without a paid tier.
- Useful prioritization and formats: Risk ranking plus text, HTML, CSV, and SARIF output supports both manual triage and structured workflows.
- Patch scope control: The unified-diff option can keep attention on changed lines and a narrow surrounding margin.
Cons
- Pattern matching is not deep analysis: Without control-flow or data-flow analysis, it can miss vulnerabilities and report non-vulnerabilities.
- Findings require expertise: Risk ranking helps order review, but does not determine whether a hit is a real security issue.
- Windows setup may be less direct: Cygwin is the stated Windows route, while direct use is only reported to work.
Alternatives
Consider Semgrep Code if its free plan’s code and supply-chain coverage across up to 10 repositories and 10 contributors, with 60 AI credits, better fits the scope you need.
Snyk Open Source is worth considering when software composition analysis is the priority: its free plan covers five projects, while its Team plan is $25 a month for up to 10 developers.
Choose MobSF for a free, GPL-3.0 open-source framework; its Professional plan is $2,999.99 a year and includes live support and troubleshooting.
NaiveSystems Analyze may suit individuals and small teams seeking a free option with some open-source components, including an on-premises analysis runner.
NodeJsScan is a free, open-source self-hosted option for Docker or local setup.
Bandit is another free-software choice, distributed under Apache License 2.0.
Bearer offers a free open SAST CLI with no numeric limits stated.
gosec is a free, Apache License 2.0 open-source Go security checker.
For more options, browse SAST Tools, Static Application Security Testing Software, C and C++ Static Analysis Tools, and Static Analysis Tools.
Verdict
Choose Flawfinder if you need a free, focused way to flag and prioritize potentially risky C/C++ source patterns, particularly when reviewing changes. Its main reason to choose is the combination of risk-ranked findings, patch-focused output, and open-source access; its main reason to look elsewhere is the absence of control-flow and data-flow analysis. Treat it as a review aid, not a complete security check.
Verdict
Flawfinder offers risk-ranked checks for C/C++ source with several report formats and a patch-focused option. Treat it as an aid to security review, not a complete vulnerability detector.
Questions
How much does Flawfinder cost?
Flawfinder is free for anyone to use and is released under GPL-2.0+.
Which systems does it support?
It works on Unix-like systems, including GNU/Linux. Windows use is described through Cygwin, and direct Windows use has also been reported to work.
What does Flawfinder analyze?
It examines C and C++ source code for possible security weaknesses by matching source text against a built-in database of functions associated with security problems.
What report formats are available?
Flawfinder can produce text, HTML, CSV, and SARIF reports. SARIF output is in JSON format.
Does it integrate with other tools?
CSV output is described as useful for integration with other tools, and Flawfinder also offers SARIF output.
Who maintains Flawfinder?
David A. Wheeler says he created and maintains Flawfinder.
Facts from Flawfinder's own pages
- CWE and practices
- The project says Flawfinder is CWE-compatible and has earned the CII Best Practices passing badge. · dwheeler.com, 4 Oct 2026
- Detection method
- It matches source text against a built-in database of C/C++ functions associated with security problems, ignoring comments and strings except for Flawfinder directives. · dwheeler.com, 4 Oct 2026
- Installation
- The site documents installation with pip, direct source download, and distribution packages; it requires Python 2.7 or Python 3. · dwheeler.com, 4 Oct 2026
- Integrations
- The site describes CSV output as useful for integrating with other tools and also offers SARIF output in JSON format. · dwheeler.com, 4 Oct 2026
- Intended users
- The site presents Flawfinder as an aid for developers seeking to find potential security problems in C/C++ application source before release, and cautions that it does not replace security knowledge or human review. · dwheeler.com, 4 Oct 2026
- License
- Flawfinder is released under GNU General Public License version 2 or later, with SPDX expression GPL-2.0+. · dwheeler.com, 4 Oct 2026
- Maintainer
- David A. Wheeler says he created and maintains Flawfinder, a C/C++ security static analysis tool, since 2001. · dwheeler.com, 4 Oct 2026
- Output formats
- It can produce text, HTML, CSV, and SARIF output. · dwheeler.com, 4 Oct 2026
- Patch review
- The --patch option limits reported hits to lines related to changes in a unified diff, with a one-line margin around changed lines. · dwheeler.com, 4 Oct 2026
- Purpose
- Flawfinder examines C/C++ source code and reports possible security weaknesses sorted by risk level. · dwheeler.com, 4 Oct 2026
- Risk ranking
- Reported hits are sorted by risk, which depends on the function and its parameter values; the tool may reduce some false positives when it determines a construct is not risky. · dwheeler.com, 4 Oct 2026
- Safe use
- The site advises analyzing a copy of source code and warns against loading or diffing hitlists from untrusted sources because they use Python pickle. · dwheeler.com, 4 Oct 2026
- Security limits
- Flawfinder does not perform control-flow or data-flow analysis, and the site warns that some reported hits are not vulnerabilities and some vulnerabilities may not be found. · dwheeler.com, 4 Oct 2026
- Support
- The project directs general questions to its mailing list and specific bugs or feature requests to git or the issue tracker on SourceForge. · dwheeler.com, 4 Oct 2026
- Supported systems
- The site says Flawfinder works on Unix-like systems, including tested GNU/Linux, and on Windows using Cygwin; it also reports that direct Windows use has been reported to work. · dwheeler.com, 4 Oct 2026
Where Flawfinder stands on Freedom251
- Static Application Security Testing Sast#4 of 24
- Static Analysis Tools#7 of 38
- C and C++ Static Analysis Tools#5 of 25
- Static Application Security Testing Software#5 of 25
- SAST Tools#6 of 26
