Appearance
Why It Matters
Embedding literal credentials directly in hook URLs or headers makes the committed hook itself a secret-bearing artifact. That creates both credential exposure risk and hard-to-rotate auth paths.
What Triggers
SEC205 applies to executable hook shell lines and triggers when literal auth material appears in:
- URL userinfo
- authorization headers
- other direct auth-carrying network parameters
Examples that trigger:
sh
curl https://deploy-token@internal.test/bootstrap.sh -o /tmp/bootstrap.sh
curl -H 'Authorization: Bearer static-token-value' https://internal.test/bootstrap.shExample that stays clean:
sh
curl https://${DEPLOY_TOKEN}@internal.test/bootstrap.sh -o /tmp/bootstrap.shFalse Positives
This rule excludes dynamic placeholders and environment-backed auth references. It is aimed at committed literal credentials, not at all auth usage.
Remediation
Move embedded credentials out of URLs and headers into environment or provider-local auth configuration. There is no built-in fix because the correct credential source is deployment-specific.