npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@codacy/tools-flawfinder-2

v0.2.1

Published

Flawfinder adapter — CLI-mode C/C++ security analyzer

Downloads

399

Readme

@codacy/tools-flawfinder-2

Table of Contents


Overview

C/C++ security scanner using the Flawfinder Python script. Uses the CLI execution strategy -- spawns flawfinder via spawnTool() and parses its SARIF JSON output.

| Property | Value | |----------|-------| | Tool ID | flawfinder | | Codacy UUID | 81806a42-1d70-40e6-ad07-9a1a9da9e500 | | Strategy | CLI | | Languages | C, CPP | | Binary | flawfinder (Python script) | | File patterns | **/*.c, **/*.h, **/*.cpp, **/*.cc, **/*.cxx, **/*.hpp | | Pattern count | ~222 | | Prerequisites | Python >= 3.8.0 |

Updating patterns

# Re-fetch pattern metadata from the Codacy API
pnpm prefetch

# Commit the result
git add src/patterns.json

Pattern IDs follow the format flawfinder_strcpy, flawfinder_gets, etc.

Updating the Flawfinder version

  1. Update preferredVersion in src/adapter.ts
  2. Update the PIP_PACKAGE constant version pin in src/adapter.ts
  3. Run pnpm prefetch to check for new/removed rules
  4. Run pnpm test to verify compatibility
  5. If the major version changes, create a new adapter package (flawfinder-3/)

Development

pnpm build    # Build with tsup
pnpm test     # Run tests (requires flawfinder in PATH or venv)

Installing flawfinder -- the adapter can auto-install via pip install into an isolated venv, or you can install manually:

# Via pip (recommended)
pip install flawfinder==2.0.19

# macOS
brew install flawfinder

# Ubuntu/Debian
apt-get install flawfinder

Notes for maintainers

  • Flawfinder is a pure Python script with no compiled dependencies beyond the standard library.
  • Installation uses an isolated venv at ~/.codacy/runtimes/flawfinder/venv/ to avoid polluting the system Python.
  • The adapter uses --sarif for SARIF v2.1.0 JSON output and --falsepositive to exclude likely false positives (matching the legacy Codacy wrapper behavior).
  • Flawfinder has no configuration file -- all options are CLI flags. checkLocalConfigurationFile always returns { found: false }.
  • Pattern filtering is done post-hoc since flawfinder has no flag to select individual rules.
  • Exit code 0 = success. Exit code 15 = encoding error. Exit code 16 = CLI option error.
  • The --minlevel flag is not set, so flawfinder uses its default minimum level of 1 (matching the legacy wrapper).
  • SARIF parsing extracts runs[0].results[]. Each result's ruleId is the function name (e.g. "strcpy", "gets").
  • The version regex handles both Flawfinder version 2.0.19 and variations in output format.