Commit 5c10b37
test: add comprehensive E2E + adversarial tests for
- 58 new tests covering full handler flow with mocked `Dispatcher.call()`
- E2E: all 7 check types, `--fail-on` exit codes, `--severity` filtering,
`--policy` validation, unknown check names, schema resolution, batching,
text/JSON output, mixed success/failure across checks
- Adversarial: null bytes, shell metacharacters, 100K-char lines, Unicode/emoji,
CRLF, spaces in filenames, deeply nested paths, malformed policy JSON, 1MB
policy files, undefined/null finding fields, 5000 findings, XSS-like content,
non-string severity, `__proto__` pollution, binary `.sql` content, symlinks,
directory with `.sql` extension, duplicate file args, empty checks string
- Fix: `normalizeSeverity()` now handles non-string inputs without crashing
(previously threw on numeric/boolean/object severity from Dispatcher)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>check command1 parent 55504fa commit 5c10b37
3 files changed
Lines changed: 995 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
| 52 | + | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
0 commit comments