They slip through when teams rely on late testing instead of continuous enforcement. Secrets are often introduced through normal developer workflows, while dependencies arrive through automated package pulls that nobody separately reviews. If scanners are not wired into commit and merge paths, the organisation only learns about the issue after the exposure has already spread.
Why This Matters for Security Teams
Secrets and dependencies are not edge cases in modern delivery pipelines. They are normal by-products of source control, build automation, package managers, and service integrations. That makes them harder to catch with one-time review or a late-stage scan. The real risk is not only exposure of credentials or vulnerable libraries, but also the loss of trust in the software supply chain when insecure artefacts move from development into production unnoticed.
Security teams often assume these issues belong to engineering hygiene, yet they quickly become governance problems. A leaked token can grant access to cloud APIs, CI/CD systems, or data stores. A compromised dependency can introduce malicious code, unstable transitive packages, or untracked licence risk. Guidance from the OWASP Non-Human Identity Top 10 is useful here because many secret-sprawl failures are really identity failures for machines, workloads, and automation.
Security leadership also needs to distinguish between detection and prevention. Finding a secret after commit is useful, but stopping it from being committed at all is materially better. The same is true for dependencies: discovering a vulnerable package in a monthly review is too late if the build system already promoted it. In practice, many security teams encounter these failures only after a leaked token or poisoned package has already been reused across multiple environments, rather than through intentional control design.
How It Works in Practice
The practical answer is continuous enforcement across developer workflows, build systems, and deployment gates. secrets management should start with reducing secret creation in the first place, then restricting where credentials can live, and finally detecting anything that still slips through. Dependency control should do the same: prefer approved sources, pin versions where appropriate, verify provenance where possible, and block risky packages before they reach release.
At a minimum, strong teams treat secrets and dependencies as separate but linked control domains. Secrets are identity artefacts for machines, while dependencies are software supply chain artefacts. Both require policy checks that run early and often. NIST’s AI Risk Management Framework is not a software supply chain standard, but its governance logic is useful when automation makes decisions at scale: define ownership, establish accountability, and validate outputs before trust is granted.
- Scan commits and pull requests for secrets before merge, not just after release.
- Block hardcoded credentials and replace them with managed secret stores or workload identities.
- Use dependency lock files, curated registries, and package allowlists for critical builds.
- Verify provenance and integrity for high-risk dependencies where tooling supports it.
- Route findings into developer workflows so remediation happens where the code changes.
For attack-path visibility, mapping common abuse patterns with MITRE ATT&CK helps teams understand how leaked credentials and untrusted packages enable persistence, privilege escalation, or lateral movement. This is where secure software process meets operational defence. These controls tend to break down when engineering teams can bypass pipeline gates for hotfixes because emergency delivery paths usually skip the very checks meant to stop secret and dependency drift.
Common Variations and Edge Cases
Tighter controls often increase delivery friction, requiring organisations to balance release speed against enforcement depth. That tradeoff is manageable in stable build pipelines, but it becomes harder in polyrepo environments, rapid experimentation, or open-source-heavy stacks. Current guidance suggests that one universal scanning model is not enough, because the right control mix depends on how code is built, reviewed, and deployed.
There is also no universal standard for secret handling across every runtime. Some environments can use workload identity and short-lived credentials almost entirely, while others still depend on long-lived keys for legacy integrations. Likewise, dependency controls vary by risk tier. A consumer-facing app with low blast radius may tolerate advisory-only alerts, while regulated or privileged systems should fail closed when provenance or vulnerability criteria are not met.
Another common edge case is shadow automation. Infrastructure scripts, notebooks, and CI variables often hold secrets outside the main application repository, which means code scanning alone misses them. This is also where NHI governance matters: unmanaged service accounts, API keys, and agent credentials can outlive the code that created them. NHI governance aligns closely with the OWASP Non-Human Identity Top 10, especially where machine identities are granted standing access that never gets reviewed.
The practical test is simple: if a control cannot stop a secret from being committed or a dependency from being imported without review, it is not yet part of secure software process. It is only an after-the-fact reporting layer.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10, MITRE ATLAS and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST AI RMF set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | Secrets often function as unmanaged machine identities in delivery pipelines. | |
| NIST CSF 2.0 | PR.AC-1 | Access control for build and release systems reduces secret exposure and abuse. |
| NIST AI RMF | GOVERN | Automation decisions in CI/CD need clear ownership and oversight. |
| MITRE ATLAS | Adversarial supply chain and misuse patterns help explain how bad artefacts get in. | |
| OWASP Agentic AI Top 10 | Agentic workflows can introduce hidden secrets and unsafe dependency actions. |
Inventory machine credentials, remove standing access, and govern non-human identities like first-class identities.
Related resources from NHI Mgmt Group
- Who is accountable when secrets are exposed through compromised infrastructure software?
- How should security teams handle exposed secrets in modern software pipelines?
- How should organisations secure workflow platforms that handle both files and secrets?
- Why do leaked secrets need a different reporting path than ordinary software bugs?