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-brakeman-4

v0.2.1

Published

Brakeman adapter — CLI-mode Ruby on Rails security scanner

Readme

@codacy/tools-brakeman-4

Table of Contents


Overview

Ruby on Rails security scanner using the Brakeman gem. Uses the CLI execution strategy -- spawns brakeman -f json via spawnTool() and parses its JSON output.

| Property | Value | | ------------- | ----------------------------------------------- | | Tool ID | Brakeman | | Codacy UUID | c6273c22-5248-11e5-885d-feff819cdc9f | | Strategy | CLI | | Languages | Ruby | | Binary | brakeman (installed via gem install) | | File patterns | **/*.rb, **/*.erb, **/*.haml, **/*.slim |

Updating patterns

pnpm prefetch
git add src/patterns.json

Pattern IDs are bare check names (no prefix): SQL, CrossSiteScripting, Execute, etc.

Updating the Brakeman version

  1. Update BRAKEMAN_VERSION in src/adapter.ts
  2. Run pnpm prefetch to check for new/removed checks
  3. Run pnpm test to verify compatibility
  4. If the major version changes, create a new adapter package (brakeman-5/)

Development

pnpm build    # Build with tsup
pnpm test     # Run tests (requires ruby + brakeman in PATH for integration tests)

To install brakeman locally for testing:

gem install brakeman -v 4.3.1

Notes for maintainers

  • Brakeman is Rails-only. The adapter checks for config/environment.rb before running and returns empty results (not an error) for non-Rails projects.
  • Whole-project scanning: Brakeman cannot target individual files. It scans the entire Rails app via -p <path>. Results are filtered by ctx.targetFiles after parsing.
  • --no-exit-on-warn --no-exit-on-error ensures Brakeman always produces JSON output.
  • -q suppresses informational messages so stdout contains only JSON.
  • Pattern IDs match check_name from Brakeman's JSON output (not warning_code).
  • Brakeman's confidence field (High/Medium/Weak) is mapped to Issue.confidence (1/2/3).
  • The errors array in Brakeman's output contains parse errors (files Brakeman couldn't read), mapped to AnalysisError warnings.
  • Config file detection supports config/brakeman.ignore (warning suppression file) and config/brakeman.yml.