code.secrets.managed-delivery
Credentials reach the code that needs them through a managed capability
Secrets are delivered to code at run time from a system built to hold them, never embedded in source, configuration, or images, so the place a credential lives is one designed to protect and rotate it.
Assertion
no credential is embedded in tracked source, configuration, or build output, and the secrets code uses are delivered from a managed secret capability at run timeRationale
Every system needs credentials; the expectation is about where they live on
their way to the code that uses them. A secret embedded in source, baked into
an image, or sat in a tracked configuration file is a secret in a place that
was never built to protect it — a place that is copied into every clone, cache,
and backup, and that has no notion of rotation. The expectation is that a
credential is held by a system designed for the job and handed to the code only
when it runs. The two existing controls in this domain,
code.repo.no-committed-secrets
and
code.iac.no-static-cloud-credentials,
assert the absence of secrets from specific places; this expectation states the
positive form they serve — that there is a proper place, and the credential is
in it.
The expectation names no single secret store. What it asks is that the delivery be managed, not that a particular product do the managing.
Observation
The expectation rests on complementary capabilities:
- a managed secret store that holds credentials with access control, rotation, and an audit trail, rather than a flat file or an environment committed to the tree;
- run-time injection, so code receives a secret as it starts rather than carrying it, and the secret never has to be written down beside the code; and
- short-lived credentials where the resource supports them, so there is
less to protect and a leaked value expires on its own — the delivery side of
pipeline.access.scoped-to-need.
A suitable check has two halves: confirm that no credential is embedded in tracked source, configuration, or build output, and confirm that the secrets code uses arrive from a managed capability at run time. The first half is already collectable; the second is a property of how the code is wired, and the catalog asserts it as an expectation without prescribing which store satisfies it.
This control is planned. The embedded-secret half can be observed today through the related controls; the delivery half is defined and reviewed but not yet collected.
Remediation
Move credentials into a managed secret store and have code read them from it, or from an environment the pipeline injects at run time, so nothing secret is ever committed or built in. Prefer credentials the resource can issue short-lived over long-lived values a store merely guards. Where a secret must exist as a stored value, keep it in the store with access control and rotation, and let the code reference it rather than contain it.