✨ feat(pariksha): license-check and codeql-baseline checks (W-64)
Slice: #282
W-64 (athya-hq/athya_mono#3625).
pariksha gains license-check and codeql-baseline. Both are ported from athya_mono's scripts/security/license-check.ts and scripts/security/codeql-baseline.ts, which W-64 deletes. Alok approved the move on athya-hq/athya_mono#3625. The licence check keeps its allow-list in the product repo's .pariksha.json, and the CodeQL baseline stays at the product's .github/codeql/error-baseline.json.
Additive only: two new commands, and no existing behaviour changes, so auto-merge stays on. The release that first carries them is the one athya_mono pins for W-64.
What differs from the scripts it replaces
- Exit 2 for input that judged nothing. An unreadable SARIF log, baseline or licence report now exits 2, with the reason on stderr. So does a report that lists no package. The old scripts exited 1 for these, the same code as a real finding. A finding still exits 1 and a pass 0. athya_mono's callers treat any non-zero as a failure, so no caller changes.
- Three tests replaced. Three of the old scripts' tests read athya_mono's own files. Here they run on fixtures instead, so the package carries no Athya data.
- One string changed. The baseline's
descriptionnamespariksha codeql-baseline --writeinstead of the old script path. - Input errors go through the CLI's
uncheckedguard. The readers rethrow, naming the file, so the modules hold no catch that swallows (shuddhi ERR-01). The CLI prints<check>: <reason>; nothing was checked, so this is not a passand exits 2.
Evidence
-
Same output as the old scripts. Each of four inputs went through the new command and the old script. All four gave the same stdout and the same exit code:
- the worktree's real
pnpm licenses list: 0, 2681 packages allowed - a GPL-3.0-only report: 1
- a clean SARIF: 0
- a SARIF with a new
js/sql-injection: 1
Full table: https://github.com/athya-hq/athya_mono/pull/3807#issuecomment-7021617025
- the worktree's real
-
Tests:
pnpm --filter @veda-hq/pariksha testpasses 3832 of 3832 tests. Coverage over all files is 99.95% lines, 98.72% branches and 99.66% functions. Rootpnpm check(every package, lint and guards) passes on 6cbf040.
🤖 Generated with Claude Code