# Secret Sprawl

> A defect in which credentials and keys are stored across code, logs and configuration.

Record: `architecture:secret-sprawl`
Kind: anti-pattern
Layer: [Enforcement Core](https://banes-lab.com/records/layer/enforcement-core.md)
Severity: discouraged
Scope: modularity, security_governance
Canonical: https://banes-lab.com/ontology#architecture-secret-sprawl

Listed in [Architecture principles](https://banes-lab.com/api/records/architecture.md), after [Authorization Scattering](https://banes-lab.com/records/architecture/authorization-scattering.md) and before [Personal Data Oversharing](https://banes-lab.com/records/architecture/personal-data-oversharing.md).

## Repair

- Refactored by: secret_manager, rotate_secret, scan_repository, least_privilege_credential
- Detected by: secret_in_repo, secret_in_log, shared_static_token, manual_secret_distribution
- Violated by: Store credentials, tokens, keys, certificates, or sensitive configuration across code, config files, logs, tickets, and local environments.
- Measured by: secrets found in source and logs
- Enforced by: secret scanning in the build, a secret store

## Severity

- [discouraged](https://banes-lab.com/records/vocabulary/severity-discouraged.md)

## Category

- [Anti-patterns](https://banes-lab.com/records/architecture-category/anti-patterns.md)

## Force

- [Modularity](https://banes-lab.com/records/force/modularity.md)
- [Security governance](https://banes-lab.com/records/force/security-governance.md)

## Negated by

- [Secrets Management](https://banes-lab.com/records/architecture/secrets-management.md)

## Linked from

- [Anti-patterns](https://banes-lab.com/ontology/principles/architecture-category-anti-patterns.md)
- [Security / Privacy / Compliance / Governance](https://banes-lab.com/ontology/principles/architecture-category-security-privacy-compliance-governance.md)
- [Security Privacy Compliance](https://banes-lab.com/ontology/lexicon/lexicon-category-security-privacy-compliance.md)
- [Severity levels](https://banes-lab.com/ontology/schema/the-vocabulary-severity.md)
- [The forces](https://banes-lab.com/ontology/schema/the-forces.md)
