[Bug] --rule silently accepts unrecognised or lowercase rule IDs, masking override findings and exiting 0
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- node.js, typescript
Research direction
Start in src/cli/args.ts to trace how --rule is parsed, then read src/cli/overrides.ts where findings are filtered and src/cli/help.ts for the documented rule IDs. Check existing CLI tests for rule filtering and invalid arguments. Done means lowercase supported IDs work consistently and unknown IDs produce a clear error instead of a successful empty result.
Written by the indexing model from the issue text.
Description
Summary
In cve-lite overrides, the --rule <id> flag silently accepts unrecognised rule IDs (e.g. --rule OA999, --rule foo) as well as lowercase rule IDs (e.g. --rule oa001).
Instead of rejecting unrecognised rules, src/cli/overrides.ts filters the findings array using exact equality against options.rule:
if (options.rule) {
findings = findings.filter((f) => f.ruleId === options.rule);
skipped = skipped.filter((s) => s.ruleId === options.rule);
}
When an invalid or lowercase rule ID is provided:
findingsis filtered to empty[].- The CLI prints
✔ No override hygiene issues found. - The command exits with code
0, even when--fail-onis specified and real override violations exist in the project.
This produces a silent false negative in CI workflows (e.g. cve-lite overrides . --rule oa001 --fail-on high), giving developers a false sense of security while severe override hygiene issues remain.
Command used
# In examples/all-scenarios which contains real OA001 findings:
cve-lite examples/all-scenarios overrides --rule oa001 --fail-on high
cve-lite examples/all-scenarios overrides --rule OA999 --fail-on high
Expected behavior
The CLI should validate the --rule argument against supported override hygiene rules (OA001–OA011, PD001–PD002), matching case-insensitively (or normalizing to uppercase), and reject unknown rules with a clear error:
Error: Unknown --rule ID "foo". Valid rules: OA001, OA002, OA003, OA004, OA005, OA006, OA007, OA008, OA009, OA010, OA011, PD001, PD002.
Actual behavior
Override Hygiene
✔ No override hygiene issues found.
Exit code: 0 (Silent pass, all real findings masked).
Reproduction
- Run
cve-lite examples/all-scenarios overrides --rule OA001 --fail-on high- Correctly outputs 2 HIGH findings and exits with
1.
- Correctly outputs 2 HIGH findings and exits with
- Run
cve-lite examples/all-scenarios overrides --rule oa001 --fail-on high- Incorrectly outputs
✔ No override hygiene issues found.and exits with0.
- Incorrectly outputs
- Run
cve-lite examples/all-scenarios overrides --rule OA999 --fail-on high- Accepts unknown rule silently, outputs
✔ No override hygiene issues found., and exits with0.
- Accepts unknown rule silently, outputs
Relevant files or output
src/cli/args.ts(lines 257-264):--ruleis read viarequireFlagValuewithout validating against recognized rule IDs.src/cli/overrides.ts(lines 53-58): Filters findings withf.ruleId === options.rule.src/cli/help.ts(line 123): Documents--rule <id> Only run a specific rule (OA001-OA011, PD001-PD002).
- Dominant language
- TypeScript
- Stars
- 786
- Forks
- 189
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 98
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OWASP/cve-lite-cli
-
fix(pnpm): buildPnpmWorkspaceMap misses root dependencies on legacy lockfiles without importersPossibly taken @muntasir-396 claimed this 2 days ago. Openbug parser
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
OWASP/cve-lite-cli#1543 ·
Maintainers usually reply within 2 days
-
[Bug] --base accepts another flag as its branch name and drops --offlinePossibly taken @vianmangal claimed this 11 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OWASP/cve-lite-cli#1430 · 1 comment · 1 reaction ·
Maintainers usually reply within 2 days
-
CVE Lite CLI — Public Adoption TrackerMay be free again @Darshan3690 claimed this 13 days ago, and no pull request is open. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OWASP/cve-lite-cli#1396 · 2 comments ·
Maintainers usually reply within 2 days
-
chore: fix TypeScript code quality violations from May 2026 auditPossibly taken @dyk1454683243-sudo claimed this 50 days ago. Openenhancement good first issue help wanted refactor
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
OWASP/cve-lite-cli#420 · 21 comments ·
Maintainers usually reply within 2 days
-
[Feature] Advisory DB metadata in both SBOM formatsPossibly taken @Nachiket-Roy claimed this 1 day ago. Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 25/100
OWASP/cve-lite-cli#1554 · 1 comment ·
Maintainers usually reply within 2 days
All issues in OWASP/cve-lite-cli
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
backnotprop/plannotator#2914 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/vscode-containers#655 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
dsh-tauri-desk/deepseek-harness-desktop#1477 · 1 comment ·