Safeguard
Security Guides•

Where should you scan for secrets besides your git repositories?

Secrets also leak through issues, pull requests, wikis, CI logs, container images and build artifacts. A table of places to scan and who owns each.

Safeguard Security Team
3 min read

Scan every place text and files are stored, not only source code: issues, pull request comments, wikis, CI logs, container image layers, build artifacts, packages and configuration exports. Secrets travel with people and pipelines, so a repository scan finds only the part that happened to be committed.

Why git is only the start

A scanner on commits catches the classic mistake. But a developer pastes an error message with a token into an issue, a build prints its environment, an image bakes in a file. Each of these is outside the commit history.

GitHub's secret scanning documentation lists a broader scope than code for this reason. It covers git history on all branches, plus issue descriptions and comments, pull request titles, descriptions and comments, discussions, wikis and secret gists. Your own coverage should be at least as wide.

Surface checklist

PlaceHow secrets get thereWhat to do
Git history, all branchesCommitted config, keysHistory scan, see below
Issues and pull request commentsPasted logs and errorsEnable platform scanning, review exports
Wikis and docsSetup guides with real valuesPeriodic scan, use placeholders
CI logsPrinted variables, verbose flagsMasking, no debug output of secrets
Test reports and artifactsDumps, fixtures, environment filesScan artifacts, short retention
Container image layersCopied files, build argumentsScan images, use build secret mounts
Published packagesIncluded config or key filesScan before publish
Chat and ticketsPasted for convenienceDetection if available, training

Related posts for each surface

A rollout order

  1. Start with repositories and pull requests, where tooling is mature.
  2. Add CI logs and artifacts, since they are generated automatically and often forgotten.
  3. Add container images and packages at build time.
  4. Add wikis and tickets with a scheduled scan.
  5. Assign an owner per surface, since each belongs to a different team.

Prevention beats scanning

Scanning finds leaks after they happen. Prevention reduces them: short lived credentials, secret masking in logs, build secret mounts instead of build arguments, and push time blocking. OWASP's cheat sheet recommends scanning during development, for instance in the IDE or with pre-commit hooks, and using more than one detection tool and correlating results.

Quick check

Do I need a separate tool for each place?

Not necessarily. Some tools cover several surfaces. What matters is that each surface is covered, and that each has an owner.

Which surface is most often forgotten?

CI logs and build artifacts, because they are produced by machines and nobody reads them until something goes wrong.

Try it yourself

Click through it at your own pace, or open it full screen. Look at how a container image is inspected layer by layer, one of the surfaces in the table.

Safeguard scans repositories and container images, and you can try a free scan.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.