exposure: git credentials in error detail, prod-honored test env overrides, unpinned CI installs #118
Labels
No labels
already-shipped
bug
documentation
duplicate
enhancement
external-review
good first issue
help wanted
in progress
invalid
needs-decision
proposal
question
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: crenshawdev/cadence-archived#118
Loading…
Add table
Add a link
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?
Three exposure surfaces, none of them a bypass, all of them worth closing.
1. Git credentials can reach the transcript
git-publish.mjs:161-163, same shape at:209andplanning.mjs:1917-1918:stdio: ['ignore','pipe','pipe']puts git's stderr intoe.message, and git prints the full remote URL on an auth or HTTP failure. A remote configuredhttps://x-access-token:ghp_...@github.com/o/r.gitputs the PAT on stdout, into the model's context, and into the transcript permanently. A leaked token forces a rotation.Fix: strip
://<userinfo>@from any git error text before it reaches the envelope. One helper, used at all three sites.2. "Test-only" env overrides are honored in production
Each carries a comment saying hermetic test injection only. Nothing gates any of them:
route.mjs:70CADENCE_ROUTE_TABLE- sets every review trigger's gateconfig-merge.mjs:26CADENCE_GLOBAL_CONFIG- supplies an entire config layerconfig.mjs:36CADENCE_CONFIG_SCHEMAplanning.mjs:128CADENCE_PLUGIN_MANIFESTworktree-base.mjs:56,65,self-verify.mjs:147This contradicts the best-reasoned security comment in the repo.
review-provider.mjs:445-460refuses an env transport override precisely because env is attacker-settable, naming ".envrc in a cloned repo, a devcontainer env block". That reasoning applies here unchanged and was not applied.Not theoretical:
CADENCE_GLOBAL_CONFIGwas the lever used to demonstrate #114 on a machine whose real global config would otherwise have shadowed it.Fix: gate on a test sentinel, or document them as supported overrides and stop calling them test-only. Either is fine; the gap between the comment and the behaviour is not.
3. CI installs unpinned packages with lifecycle scripts enabled
.github/workflows/test.yml:Unpinned, no integrity check, postinstall enabled, on
pull_request. Blast radius is genuinely small -permissions: contents: read, no secrets in the job, notpull_request_target- which is why this is INFO rather than a finding. Still: pin both versions and add--ignore-scripts.Fixed in v3.2.0 (PR #124). EXP-01, phase 2. redactUrl() strips userinfo from git failure detail at all four emit sites, each with its own test. The environment overrides commented "test injection only" are gated behind CADENCE_TEST_SEAM=1.
Verified through the phase UAT walk. The milestone audit traced 12/12 requirements with 0 broken and 36/36 acceptance criteria covered.