secrets.sh --built — the scan stops at the repository, and secrets ship in the bundle #8

Closed
opened 2026-08-17 22:51:05 -05:00 by null · 0 comments
Owner

secrets.sh scans the staged diff and, with --tracked, the tracked tree. Neither sees the compiled output, which is the artifact users actually receive. An auditor of AI-built apps reports finding hardcoded keys in the frontend bundle of seven of eight apps in a single week.

Add a --built

mode to the existing script rather than writing a new one: it already resolves SECRETS_PATTERN_FILE and holds the project's own credential shapes. Add the patterns that recur in shipped bundles -- eyJ (a JWT header), service_role, anon, apikey, Bearer -- and the VITE_, REACT_APP_ and NEXT_PUBLIC_ prefixes, which are listed even when benign because 'deliberately shipped to the browser' is worth seeing enumerated.

Verify: secrets.sh --built finds a planted fake credential in a scratch build directory and goes quiet once it is removed; docs/architecture/README.md records the new mode.

secrets.sh scans the staged diff and, with --tracked, the tracked tree. Neither sees the compiled output, which is the artifact users actually receive. An auditor of AI-built apps reports finding hardcoded keys in the frontend bundle of seven of eight apps in a single week. Add a --built <dir> mode to the existing script rather than writing a new one: it already resolves SECRETS_PATTERN_FILE and holds the project's own credential shapes. Add the patterns that recur in shipped bundles -- eyJ (a JWT header), service_role, anon, apikey, Bearer -- and the VITE_, REACT_APP_ and NEXT_PUBLIC_ prefixes, which are listed even when benign because 'deliberately shipped to the browser' is worth seeing enumerated. Verify: secrets.sh --built finds a planted fake credential in a scratch build directory and goes quiet once it is removed; docs/architecture/README.md records the new mode.
null added this to the Batch 01 — Production-readiness controls milestone 2026-08-17 22:51:05 -05:00
null added the
P1
label 2026-08-17 22:51:05 -05:00
null closed this issue 2026-08-17 22:59:42 -05:00
Sign in to join this conversation.
No Label
P0
P1
P2
release-blocker
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: null/Project-Template#8
No description provided.