presidentbeef/brakeman · error · MissingChecksError
Could not find specified check#{missing.length > 1 ? 's' : '
Error message
Could not find specified check#{missing.length > 1 ? 's' : ''}: #{missing.map {|c| "`#{c}`"}.join(', ')} What it means
After checks are loaded, Brakeman validates every check name passed via `-k/--checks <names>` (run only), `-x/--skip-checks`, and `--enable` against its registry of known checks; any name `Brakeman::Checks.missing_checks` reports is collected and the run aborts with `Brakeman::MissingChecksError` listing the unknown names. This catches typos and stale names before a scan that would silently skip the intended checks.
Source
Thrown at lib/brakeman.rb:656
end
end
tracker.ignored_filter = config
end
def self.add_external_checks options
options[:additional_checks_path].each do |path|
Brakeman::Checks.initialize_checks path
end if options[:additional_checks_path]
end
def self.check_for_missing_checks included_checks, excluded_checks, enabled_checks
checks = included_checks.to_a + excluded_checks.to_a + enabled_checks.to_a
missing = Brakeman::Checks.missing_checks(checks)
unless missing.empty?
raise MissingChecksError, "Could not find specified check#{missing.length > 1 ? 's' : ''}: #{missing.map {|c| "`#{c}`"}.join(', ')}"
end
end
def self.debug= val
@debug = val
end
def self.quiet= val
@quiet = val
end
def self.process_step(description, &)
logger.context(description, &)
end
class DependencyError < RuntimeError; end
class NoBrakemanError < RuntimeError; end
class NoApplication < RuntimeError; endView on GitHub (pinned to 649e678d0a)
Solutions
- List the checks available in your installed version: `brakeman --checks` (optionally `--optional-checks`) and copy the exact names.
- Fix the typo/rename in the `-k`/`-x`/`--enable` list to match the listed names.
- For custom checks, pass the correct load path first (`--add-checks-path path/to/checks`) and remember optional checks must be explicitly `--enable`d.
- If the name came from an old config, consult the CHANGES.md of your Brakeman version for renamed/removed checks and update the config.
Example fix
# before brakeman -k CrossSiteScriptin,SQL # => MissingChecksError: Could not find specified check: `CrossSiteScriptin` # after (correct names, verified via `brakeman --checks`) brakeman -k CrossSiteScripting,SQL
Defensive patterns
Strategy: validation
Validate before calling
# Ruby, use Brakeman's own registry to pre-validate names
names = %w[CrossSiteScripting SQL MyCustomCheck]
missing = Brakeman::Checks.missing_checks(names)
raise Brakeman::MissingChecksError, "Unknown: #{missing.join(', ')}" unless missing.empty?
Brakeman.run :app_path => app, :run_checks => names Try / catch
begin
Brakeman.run :app_path => app, :run_checks => names
rescue Brakeman::MissingChecksError => e
abort "#{e.message} — run `brakeman --checks` to list valid names." # or fix names and retry
end Prevention
- After every Brakeman upgrade, re-validate configured check names against `brakeman --checks` / `--optional-checks` in CI.
- When using custom checks, always pass --add-checks-path and prefer fingerprints/names verified in a smoke run.
- Treat this error as a hard failure, not a warning: an unknown check name means your intended scan scope is not being applied.
When it happens
Trigger: Running `brakeman -k CrossSiteScriptin` (typo), referencing a check that was renamed or removed after upgrading Brakeman (e.g. old check names in a shared CI config), or pointing at a custom/optional check without first making its path loadable via `--add-checks-path` (optional checks also need `--enable`).
Common situations: A version pin bumped in one repo while the central CI template still lists old check names; custom in-house checks used with `--add-checks-path` where the path argument is wrong or the checks directory moved; copying a `-k` list from an old blog post or another tool's config.
Related errors
- Comparison file doesn't exist
- Cannot specify output format if multiple output files specif
- Invalid GitHub repository format
- Minimum age must be 1-15 days.
- Invalid format options: #{invalid_options.inspect}
AI-assisted analysis of presidentbeef/brakeman@649e678d0a (2026-08-21).
Data as JSON: /api/errors/0e6fd04de6b50deb.
Report an issue: GitHub.