The hook that scans what you commit
Pre-commit used to audit the working tree. --staged now scans the Git index, so leftover edits no longer block a correct commit and a staged regression reverted only on disk no longer slips through. The published CLI also requires Node.js 22.12, and the bundled ruleset advances for a large accuracy pass.
- --staged audits the Git index; regenerated pre-commit hooks pass it.
- Node.js 22.12 is now the published CLI floor.
- Bundled ruleset advances to 2026.11.47 with dozens of accuracy fixes.
- The scan pipeline lazy-loads, so --version and --help skip TypeScript.
- --check-ui launches Chromium with its sandbox enabled.
The commit you meant
A pre-commit hook that scans the working tree is gating the wrong thing.
git add -p is a normal way to keep a commit small, and leftover edits on
disk should not fail a hook that is supposed to protect the commit. The
inverse is worse: a staged regression that you reverted only on disk used to
pass, because the hook never looked at the index.
--staged exports the index's regular files to a private temporary directory
and audits that tree. shadscan setup --pre-commit now writes hooks (and
manual steps for hook managers) that pass it. The CLI honors the GIT_DIR
and GIT_INDEX_FILE that Git sets for hooks, so git commit -a and
git commit <path> are gated by the index they record, and the export is
removed afterwards, including on Ctrl-C.
Hooks generated by earlier versions pin a CLI without --staged and keep
scanning the working tree. Remove such a hook and rerun setup --pre-commit
to gate staged content.
Node.js 22.12, and a faster start
The published CLI now requires Node.js 22.12 or newer. 0.17.1 and earlier supported Node.js 18. Commander 15 and the rendered UI check's Playwright runtime no longer support that older floor, and CI tests the packed CLI on Node.js 22.12 and 26.
The CLI also loads the scan pipeline — including the TypeScript compiler and
every rule — only when a command actually scans. --version, --help, and
--list-projects start without that work. The packed CLI now ships
code-split chunks under dist/chunks/; the library entry is unchanged.
Workspace scans now audit at most 25 library packages, alongside the existing cap of 25 applications, and each package is discovered once. Shared syntax trees, a memoized render graph, concurrent source reads, and an iterative walker cut repeated work without changing report findings apart from timing.
Scores that now mean what they say
The bundled ruleset advances to 2026.11.47. Reports carry the new version,
and scores can change without any change to the scanned source.
A large accuracy pass is the reason. Shell-scoped rules now share one root
layout discovery and follow local Providers wrappers. Vite aliases and
solution-style tsconfig references resolve the way the render graph already
did. Form, heading, empty-state, metadata, navigation, and pending-state
checks look at what the code actually does instead of a nearby string that
looked like it.
Workspace reports now aggregate source coverage and warnings from every
scanned package, so --fail-under fails a workspace whose sources were only
partly read. A rule that throws no longer aborts the whole scan; its result
is excluded from the score and coverage is marked partial.
Sandboxed browsers and a tighter scan boundary
--check-ui now launches Chromium with its sandbox enabled. When the
operating system blocks the sandbox, the check retries once without it and
writes one warning to stderr. --no-browser-sandbox or
SHADSCAN_BROWSER_SANDBOX=0 skips the sandbox and the warning;
SHADSCAN_BROWSER_SANDBOX=1 requires it.
Workspace discovery no longer follows symbolic links when it looks for
packages, and a package whose real path resolves outside the scan boundary
is skipped instead of audited. The zod dependency moves to 4.6.6, past
GHSA-mrhx-c7xc-m3w5, and cross-spawn moves to 7.1.2, past
GHSA-ghv9-86vm-4v8m.
Rule IDs, scoring weights, and the 62-rule catalog size are unchanged. The ruleset version and Node.js floor are not.