bash -x leaks staged credentials across the wrapper fleet (parity gap held open by mint-seat-credential #1367) #1369

Open
opened 2026-08-22 04:20:08 +00:00 by code-infra-01 · 0 comments
Member

From rev-security-01's review 263 on #1367 (control run by the reviewer): the landed gitea_write_auth_config in detect-platform.sh — the in-tree standard used by issue-comment.sh, pr-review.sh, pr-edit.sh — still expands tokens into shell words and leaks them under bash -x (three trace sites measured). #1367's mint-seat-credential.sh closes both argv and trace channels for itself (file-to-file assembly; verified by an xtrace assertion in its suite), which puts it AHEAD of the landed pattern, not at parity.

This issue records the fleet-wide gap so the parity debt is owned rather than implied:

  • Affected class: every wrapper that stages a credential through a shell-word expansion before writing it to a curl --config (detect-platform.sh's gitea_write_auth_config is the shared instance).
  • Not affected in this PR's scope: mint-seat-credential.sh (closed at review 263 blocker 1).
  • The fix shape is already proven in #1367: helpers take file PATHS, not values; jq --rawfile assembles configs and bodies file-to-file; secrets never become shell words.

Also from review 263, same disposition-to-write-down class: the instance host maps in seat-logins.sh and mint-seat-credential.sh are per-estate constants in the framework tree (accepted on the seat-logins precedent in #1367, explicitly not a reason to stop looking). A fleet-wide host-map/domain parameterization decision belongs here too.

Disposition per fred's 2026-08-22 rulings on #1367: those files were deliberately left alone in that PR; this issue is the tracked owner of the gap.

From rev-security-01's review 263 on #1367 (control run by the reviewer): the landed `gitea_write_auth_config` in detect-platform.sh — the in-tree standard used by issue-comment.sh, pr-review.sh, pr-edit.sh — still expands tokens into shell words and leaks them under `bash -x` (three trace sites measured). #1367's mint-seat-credential.sh closes both argv and trace channels for itself (file-to-file assembly; verified by an xtrace assertion in its suite), which puts it AHEAD of the landed pattern, not at parity. This issue records the fleet-wide gap so the parity debt is owned rather than implied: - Affected class: every wrapper that stages a credential through a shell-word expansion before writing it to a curl --config (detect-platform.sh's gitea_write_auth_config is the shared instance). - Not affected in this PR's scope: mint-seat-credential.sh (closed at review 263 blocker 1). - The fix shape is already proven in #1367: helpers take file PATHS, not values; jq --rawfile assembles configs and bodies file-to-file; secrets never become shell words. Also from review 263, same disposition-to-write-down class: the instance host maps in seat-logins.sh and mint-seat-credential.sh are per-estate constants in the framework tree (accepted on the seat-logins precedent in #1367, explicitly not a reason to stop looking). A fleet-wide host-map/domain parameterization decision belongs here too. Disposition per fred's 2026-08-22 rulings on #1367: those files were deliberately left alone in that PR; this issue is the tracked owner of the gap.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#1369