You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
43 command modules still accept unknown flags silently — sweep the flag-validation advisory to zero #488
self-audit/flag-validation reports 43 command modules that accept unknown flags (2/45 validate after #487). The advisory is severity low by deliberate design, so it never gates — but the class is not theoretical:
kit check --category security ran the FULL check for as long as it was documented, across six majors, because nothing rejected the flag.
Both are the same defect: a flag that silently does nothing is indistinguishable from a working one.
Why this is not a mechanical pass
An allowlist built from the wrong source is its own outage. CHECK_FLAGS was first derived from commands/check.ts's own literals, which rejected kit check --attest and --no-auto-install — both documented, both read one import away in cli-checks-shared.ts. The check exited 1 and never ran.
So each module needs its allowlist derived from what the callees read, not from the handler file. Per module:
grep the argv readers on that command's call path (hasFlag/flagValue/flagInt/raw process.argv indexing), including imported modules;
cross-check docs/COMMANDS.md for flags documented on that command;
add the module to a coverage test whose oracle is the source scan, not a restated list.
Suggested order — the side-effectful ones first, since a typo there does something rather than nothing: secrets, install, setup, hooks, env, policy, identity, login, then the read-only reporters.
Done when
self-audit/flag-validation reports all 45 command module(s) reject unknown flags, and a test pins that a new command module cannot land without an allowlist.
Activity
feat(cli): reject unknown flags on every command, from a declared sur…
feat(cli): reject unknown flags on every command, from a declared sur…
chore(memory): the surface-plus-chokepoint pattern, and what a covera…
chore(release): 6.7.0 (#499)