Quick answer: Secret scanners can inspect more than Git when configured for those sources. Their blind spots are the material they cannot access or are not configured to inspect, plus credentials their detectors miss. Inventory repositories, local configuration, permitted exports and logs; combine scanning with safer delivery and provider permissions. A clean scan is not proof that no key was exposed.
Start with a coverage map
An agent may encounter secrets in source, configuration, tool responses or conversations. Ask which of those surfaces your scanning process actually covers.
| Surface | Coverage to establish | Remaining limitation |
|---|---|---|
| Repository content and history | Branches, relevant history and scanner configuration | Unsupported patterns, exclusions and incomplete checkouts |
| Untracked files and local configuration | Explicit file or directory scanning where authorised | Files never supplied to the scanner remain outside coverage |
| Conversation exports and logs | Approved access, formats and safe handling | Private remote content may be unavailable; a scan creates another sensitive artifact |
| Tool inputs and outputs | Appropriate runtime checks or permitted stored records | Detection cannot guarantee that every secret format is recognised |
| Hosting or CI artifacts | Actual stored artifacts, logs and integrations | Access restrictions, retention and packaging may hide material from a repository-only scan |
A tool capable of scanning files does not automatically receive every log or conversation. Conversely, a repository-only configuration is not a limitation of the entire scanning category.
What common tools support
Gitleaks supports Git, file/directory and standard-input scanning. Match the command and configuration to the version you use. A pre-commit hook is not a substitute for a separate history scan.
TruffleHog supports Git, filesystems and additional sources. Some capabilities verify candidate credentials by contacting their issuers. Understand that network behaviour and obtain appropriate authorisation before scanning sensitive material.
GitHub secret scanning inspects repository history and supported additional surfaces, including certain issue and pull-request content. Available features depend on repository type, product and settings. Partner notification may enable a provider to act on a detected credential; do not assume every finding is automatically revoked.
Use maintained upstream installation and CI instructions. Pin and review the chosen versions or action revisions, then test the resulting setup with approved fictional fixtures. This guide does not provide an untested, supposedly universal workflow.
Configure coverage without hiding real findings
Record the intended scope: current files, history, branches, ignored files, exports and other sources. Check whether a shallow checkout or changed-files-only scan matches that purpose.
Review exclusions individually. Ignoring an entire agent configuration directory may hide useful, non-secret project rules as well as credentials. Excluding a whole fixture directory from scanning may also conceal a real key mistakenly placed there.
Keep private local configuration out of version control where appropriate, but remember that .gitignore does not remove tracked files or past commits. Use narrow exclusions and maintain a separate plan for scanning authorised local files.
Treat findings as sensitive. Scanner output may contain the matched value, so configure redaction where supported, restrict reports and avoid copying raw results into chat or public tickets.
Test the pipeline, not just the command
With non-live fixtures approved for your environment:
- Verify that a known supported pattern is detected in the intended source.
- Check that exclusions do not accidentally cover the test path or real configuration.
- Confirm the configured exit status blocks or alerts as intended.
- Test history coverage separately from staged-file checks.
- Confirm that alerts reach an owner and reports do not disclose unnecessary values.
Pattern matches can be false positives. Detectors can also miss credentials, encoded values or unsupported formats. A failed validity check is not always proof that a credential is harmless: network errors and issuer restrictions can affect verification.
Scanning and credential delivery solve different problems
Scanning detects possible exposure in the material it inspects. Provider permissions limit what a credential authorises. Retrieval policy controls which credentials a caller may obtain. Runtime controls govern handling and execution.
Gazebo can centralise retrieval identities, selected-key approval and retrieval history. It returns the actual stored provider key to the runtime and its host; it does not automatically generate a narrower token or keep the key out of model context and logs.
For supported setup, use the hosted MCP guide, SDK or CLI documentation. Client-specific authentication and interpolation support vary. A configuration template is not automatically safe to publish merely because it refers to an environment variable.
Respond to a real finding
Identify the credential's issuer and permissions without distributing the value further. Restrict access to affected artifacts, preserve necessary evidence and invalidate or replace exposed provider keys as appropriate.
Revoking a retrieval token does not invalidate a provider key already delivered. Likewise, a retrieval log is not a record of subsequent provider operations. Use provider and runtime evidence to investigate use.
Remove or restrict affected copies through supported procedures, but do not assume rewriting Git history or deleting a visible log erases every copy. Correct the exposure path before distributing replacement credentials.
Use the incident-response playbook rather than improvising a separate containment process for scanner alerts. The prompt-handling guide and environment guide address two common delivery surfaces.