DET-129 · human · confidence High

Secret Dumping in Build Logs

Search CI job definitions and logs for steps that print, encode or ship out secrets.

Masked secrets still leak when a job encodes them, splits them or sends them over the network. Scanning both the job definition and the produced log for these patterns catches insiders and agents harvesting runner credentials. Running the check at PR time also blocks the attempt before it runs.

When a match fires, treat every secret the job could read as exposed. Rotate them, then check cloud and SaaS logs for use of those credentials from IPs that are not runners.

Data sources
CI job logsWorkflow file contentsGitHub Actions or GitLab CI API
Platforms
SaaSLinux

Logic

1. Grep workflow diffs for `printenv|env\s*\||set\s*\||base64|xxd|toJSON\(secrets\)|\$\{\{\s*secrets\.[A-Z_]+\s*\}\}.*(curl|wget|nc)`.
2. Grep job logs for long base64 strings (`[A-Za-z0-9+/]{40,}={0,2}`) and known key prefixes (`AKIA`, `ghp_`, `xoxb-`, `sk_live_`).
3. Alert on any match in a branch build or fork PR; page on matches in jobs that hold production secrets.

False positives

Debug steps that print non-secret environment values, and tests that decode fixture data.

Catches 1 technique