Skip to content

fix(scanner): error on unknown --matchers slugs#75

Open
DarlingtonDeveloper wants to merge 1 commit into
vercel-labs:mainfrom
DarlingtonDeveloper:fix/warn-unknown-matcher-slugs
Open

fix(scanner): error on unknown --matchers slugs#75
DarlingtonDeveloper wants to merge 1 commit into
vercel-labs:mainfrom
DarlingtonDeveloper:fix/warn-unknown-matcher-slugs

Conversation

@DarlingtonDeveloper
Copy link
Copy Markdown

Summary

  • Adds unknownSlugs() method to MatcherRegistry
  • Both scan() and scanFiles() now validate requested slugs before running
  • Throws a clear error naming the unknown slugs and listing all available matchers

Reproduction (from #34)

deepsec scan --matchers xss,does-not-exist

Before: silently runs only xss, exits 0
After: throws Unknown matcher slug: does-not-exist with the full available matcher list

Test plan

  • Added regression test in scan-files.test.ts
  • pnpm test:unit
  • pnpm lint

Fixes #34

🤖 Generated with Claude Code

…gnoring

When `--matchers` includes a slug that doesn't exist in the registry,
deepsec now throws with the unknown slug names and lists all available
matchers. Previously unknown slugs were silently dropped, making invalid
scan requests look successful.

Fixes vercel-labs#34

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 16, 2026

@DarlingtonDeveloper is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unknown --matchers slugs are silently ignored

1 participant