← Back to all fixes
Secret accidentally printed in CI logs
The Issue
Running a build command printed `DB_PASSWORD=mysecret` in the CI log that is visible to all team members.
Root Cause
The command echoed env vars (e.g. `set -x` in shell scripts, verbose build tools), or the secret was passed as a CLI argument rather than an env var.
How to Fix
Rotate the exposed secret immediately — treat it as compromisedRemove `set -x` from shell scripts that run in CIPass secrets as environment variables, never as CLI argumentsUse your CI system's secret masking — most platforms auto-mask registered secrets in logsAudit your scripts: `grep -r "echo.*SECRET" .` to find accidental prints