Coverage breaks first. Teams miss new or slightly modified payloads, especially when malicious logic is spread across helper functions or disguised as ordinary automation. Review queues also become noisy if analysts chase only exact matches. The practical fix is to focus on indicators of behaviour, not just known bad hashes or copied snippets.
Why This Matters for Security Teams
Exhaustive malicious code signatures fail at the point where supply chain attacks evolve faster than detection logic. A signature can catch a known package hash or a copied payload, but it misses small rewrites, helper-function fragmentation, and malicious logic hidden inside otherwise normal automation. That is why behavioural indicators, provenance, and execution context matter more than exact text matches alone. The OWASP Non-Human Identity Top 10 and NIST SP 800-53 Rev. 5 both reinforce the need to control what code is allowed to run, not just what is known to be bad.
NHIMG research shows why this matters operationally: the Reviewdog GitHub Action supply chain attack exposed how a trusted automation path can become a secrets sink, while the Shai Hulud npm malware campaign showed how malware can be distributed through normal package workflows. In practice, many security teams encounter the compromise only after the build pipeline has already executed the payload, rather than through intentional pre-release detection.
How It Works in Practice
When teams cannot maintain exhaustive signatures, the defensive model has to shift from exact-match detection to trust and behaviour controls around the pipeline. That means validating package provenance, tightening build-time permissions, and watching for suspicious execution patterns such as new outbound destinations, unexpected child processes, or unusual secret access. A malicious payload may be semantically identical to benign code from a scanner’s perspective, yet still behave differently once it reaches CI/CD runners or post-install hooks.
For supply chain security, the practical control stack usually includes:
- Provenance checks for commits, packages, and build artifacts so trust is tied to source and release identity.
- Least-privilege pipeline permissions so a compromised dependency cannot access everything the runner can.
- Runtime and build-time behavioural detection for process spawning, network beacons, and secret exfiltration.
- Automated revocation for tokens, keys, and ephemeral credentials exposed during a build or install step.
This is also where secret hygiene becomes inseparable from supply chain security. GitGuardian’s State of Secrets in AppSec research reports that the average time to remediate a leaked secret is 27 days, which is far too slow once an attacker has a working token. Behavioural controls help because they can flag the act of credential use or exfiltration even when the malware itself is novel. NIST control guidance on audit logging and system integrity supports this approach, but the exact tooling and thresholds are still environment-specific.
These controls tend to break down when CI/CD runners are over-privileged, internet-facing, and allowed to reuse long-lived secrets across many build jobs.
Common Variations and Edge Cases
Tighter behavioural detection often increases false positives and triage overhead, requiring organisations to balance stronger coverage against analyst workload and build reliability. That tradeoff is especially visible in fast-moving software teams, where legitimate automation can resemble malware: dependency scanners, release bots, code generators, and security test harnesses all perform actions that look suspicious in isolation.
Best practice is evolving, but current guidance suggests treating some scenarios differently:
- Signed open-source dependencies can still be risky if the maintainer account, release pipeline, or post-install script is compromised.
- Malware embedded in helper functions may evade hash-based detection, so function-level similarity and execution context matter more than file-level matching.
- Private repositories are not automatically safer when secrets, credentials, or CI tokens are present in workflows and logs.
- Heavily automated teams need allowlisted behaviours and provenance checks, not just broad blocking rules, or build velocity will suffer.
NHIMG’s Mastra npm Supply Chain Attack and Miasma and Hades Supply Chain Worms show why signature-only controls are brittle once malicious code starts propagating across ecosystems. The operational answer is not to abandon detection, but to layer provenance, runtime policy, and rapid revocation around it. There is no universal standard for this yet, so teams should tune controls to their build frequency, package exposure, and tolerance for pipeline friction.
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, OWASP Agentic AI Top 10 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-03 | Signature gaps make credential misuse and secret exposure harder to catch. |
| OWASP Agentic AI Top 10 | A-04 | Autonomous code paths can chain actions beyond what signatures predict. |
| CSA MAESTRO | MAESTRO-03 | Supply chain trust depends on provenance and behavioural controls, not static matches. |
| NIST AI RMF | Behaviour-based detection aligns with managing AI-enabled supply chain risk. | |
| NIST CSF 2.0 | PR.DS-6 | Integrity protection is essential when signatures cannot cover all malicious variants. |
Constrain tool use with runtime policy and monitor agent-like automation for unexpected execution paths.
Related resources from NHI Mgmt Group
- What breaks when code-to-cloud visibility is missing in software supply chain security?
- How should security teams govern software supply chain risk when CI/CD identities can publish code?
- What breaks when software supply chain security does not cover AI-generated code and agent tooling?
- What breaks when security teams rely only on visual code review to catch supply chain attacks?
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on August 27, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org