Skip to content

fix(ci): secret-scanner remediation text no longer cites the leak site - #819

Merged
hyperpolymath merged 2 commits into
mainfrom
fix/800-shell-secrets-citation
Sep 17, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
fix/800-shell-secrets-citation

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Closes #800.

The defect (re-measured at HEAD 33ec4a7, 2026-09-17)

The shell-secrets job's remediation message read:

Source from env (see avow-protocol/deploy-repos.sh) instead.

That citation fails twice, in the issue's words:

  1. It cites the leak site as the model of good practice. The same file identifies avow-protocol/deploy-repos.sh as the failure case this gate was created for — twice, in comments (L17-19, L671).
  2. It 404s. avow-protocol/deploy-repos.sh was removed by security(avow-protocol): remove leaked Cloudflare API token + harden scanner #161; avow-protocol/ now holds only BINDING.adoc. The guidance cannot be followed even in principle.

Fix (the issue's own suggested text)

echo "::error::Hardcoded secret detected in a shell script. Read the value from the environment (e.g. "\${MY_TOKEN:?}") and supply it via a repo or org secret."

The citation is dropped rather than repointed — any named example can rot the same way, and the advice needs no example to be actionable. The two comments documenting the leak's history are untouched: they are accurate records of why the gate exists.

Byte-verified: the line is "/\$-escaped correctly for bash (single backslashes; od -c checked). One file, +1/-1.

closes #800)

The shell-secrets job's remediation message pointed developers at
avow-protocol/deploy-repos.sh — the exact file whose leak created this
gate (cited twice in this same file's comments as the failure case),
and a path removed by #161, so the guidance 404s.

Adopt the issue's suggested text: instruct env-sourcing with an inline
example and no named file — any named example can rot the same way.
@coderabbitai

coderabbitai Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hyperpolymath
hyperpolymath merged commit b584759 into main Sep 17, 2026
12 of 15 checks passed
@hyperpolymath
hyperpolymath deleted the fix/800-shell-secrets-citation branch September 17, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

secret-scanner-reusable.yml: shell-secrets remediation cites the leak site as the model of good practice, and the path is dangling

1 participant