[DUP-4] Shell scripts: token-fetch block copy-pasted ×6, banner ×5, validity parsing byte-identical (01/02), secrets visible in argv #39
Labels
No labels
architecture
code-quality
correctness
critical
docs
high
low
medium
ops
performance
privacy
security
tests
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
antrapol/CA-MDID-eMudhra#39
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding
The ~15-line curl+jq token block is identical in 01/02/04/06/07/08; 'Connection Info' banner ×5;
--validityparsing (~60 lines) byte-identical between 01 and 02;curl -d "client_secret=…"exposes the secret viapsfor the duration of the call (same for Bearer headers).Evidence
scripts/01_enroll.sh:116-131vs the same block in 02/04/06/07/08 (diff-verified)Impact
~150 removable lines; secret leakage to local process listing.
Fix
scripts/lib/common.sh(token fetch, banner, validity parsing)--data @-/curl --config so they never appear in argvLine numbers refer to the initial import commit
282cb11. Source: comprehensive audit, 2026-11-12 (first review of this codebase).Verified fixed on main (
1b6216b): scripts share scripts/lib/common.sh; secrets go via stdin (B6, PR #59).