# Exposed repository or history secret

Source, history, or a published artifact exposes a credential outside its intended audience.

**Candidate CWE:** [CWE-540](https://cwe.mitre.org/data/definitions/540.html)

## Test hypothesis

Find the value locally, trace its consumer and intended audience, and identify the affected commit or artifact. Use a synthetic substitute to demonstrate the credential path. Ask the owner to establish validity or use a specifically permitted identity-only validation; do not try an unknown key against unrelated services.

## Evidence required

Record the location and access path, credential type, consumer, privilege assumptions, and a redacted fingerprint. Distinguish owner-confirmed validity from an unverified secret-like pattern. CWE-540 describes sensitive material included in source; classify an artifact exposure by its actual storage/disclosure cause.

## Rule out false positives

A fake example, revoked token, public client identifier, or scanner regex match does not establish exploitable credential exposure. A deployment secret accidentally committed to a repo is not automatically a hard-coded product credential.

## Playbook and command references

- [Source review: entry point to protected operation](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/modules/source-dataflow.html) — Trace attacker control and authorization through handlers, services, queues, and sensitive operations; promote only reachable violations of a stated invariant.
- [CI and releases: trace untrusted input into privileged work](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/modules/supply-chain-ci.html) — Audit workflow events, shell interpolation, untrusted builds, artifact consumers, and release identity as one privilege chain.

[Find the associated command snippets](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/commands.html?q=Source%20review%3A%20entry%20point%20to%20protected%20operation)

## Referenced by these target playbooks

[OSS & self-hosted](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/oss.html) · [Cloud & containers](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/cloud.html) · [AI, agents & MCP](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/ai.html)

## Report checklist

- [ ] Capture the affected version, configuration, identities, and object ownership.
- [ ] Preserve a valid baseline and a negative control.
- [ ] Reproduce the forbidden data access, action, or state change on controlled fixtures.
- [ ] Explain the intended security rule and why the observed behavior violates it.
- [ ] State prerequisites, uncertainty, cleanup, and the smallest demonstrated impact.

## Conditional ATT&CK mapping

- [T1552.001 · Unsecured Credentials: Credentials In Files](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/attack.html#T1552-001) — **Only if:** The tested path retrieves credentials from insufficiently protected configuration, source, log, archive, or other files; retain only redacted evidence and location details. **Not established by:** A high-entropy string, sample credential, or accessible file without authentication material is insufficient. Reading arbitrary non-secret data is a different behavior.

## Primary references

- [GitHub secret-scanning patterns](https://docs.github.com/en/code-security/secret-scanning/introduction/supported-secret-scanning-patterns)

[Back to the complete vulnerability catalog](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/vulnerabilities.html)
