Look for unusual package republishing, unexpected install scripts, new workflow files, outbound connections from build hosts, and unexplained secret rotation alerts. Those signals indicate the attacker is harvesting credentials or establishing persistence rather than only modifying code. The earlier those signs are caught, the smaller the blast radius.
How package tampering becomes secret theft
The transition point is usually visible in behaviour, not just in code changes. Package tampering changes what gets delivered; secret theft changes what the attacker can access, reuse, or persist with. Once you see build-time or install-time activity aimed at collecting credentials, the incident is no longer just a supply-chain integrity problem, it is also an exposure problem.
A useful way to read the signals is to separate delivery manipulation from post-compromise collection. Unusual republishing and unexpected install scripts can still be early-stage tampering, but outbound connections from build hosts, secret harvesting in workflow files, or rotation alerts triggered without a planned change strongly suggest the attacker has crossed into credential access.
That matters because secret theft expands blast radius. A modified package may affect one dependency path; stolen secrets can reach source control, CI/CD, cloud, registry, ticketing, or deployment systems, and can remain useful even after the bad package is removed. A supply-chain event becomes much harder to contain once the attacker has a reusable authentication path.
Which signals point to credential harvesting or persistence?
The most important shift is from artifact abuse to environment abuse. An install script that executes unexpectedly may be a delivery mechanism, but a build host reaching out to unfamiliar destinations or a workflow file appearing where none should exist suggests the attacker is using the package event to stage follow-on access. That is the practical sign that the compromise is moving sideways into the surrounding system.
Secret rotation alerts are especially meaningful when they do not line up with a change request or release. They can indicate an exposed token was discovered and replaced, a monitoring rule caught abnormal use, or the attacker attempted to force failure in order to test which credentials still work. In a mature investigation, those alerts are treated as evidence of credential impact until proven otherwise.
For readers tracking the broader supply-chain pattern, the key distinction is whether the attacker is still altering software content or is now exploiting the trust surrounding it. The latter usually means persistence, token reuse, and possible downstream access to other services that trust the same build or deployment identity. See the relationship between package compromise and credential exposure in LiteLLM PyPI package breach and the wider attack patterns in The State of NHI & AI Agent Breach Report 2026.
Why the warning signs should trigger a secrets response
Once the indicators include outbound traffic, workflow creation, or unexplained rotation events, you should assume secrets may be exposed even if the package itself looks contained. That assumption is operationally important because secret compromise often survives package removal, cache invalidation, or repository rollback. The attacker may already have copied the material they need.
This is why secret inventory and rotation readiness are part of the response, not a later cleanup task. If the compromised path could have accessed CI/CD variables, registry tokens, signing keys, or cloud credentials, those values need to be treated as potentially usable elsewhere. A good comparison is any incident where exposed credentials turn a source compromise into broader access, as discussed in Guide to the Secret Sprawl Challenge and Secrets Management Guide.
From a supply-chain perspective, this is also where integrity controls and secret controls intersect. If the build or packaging step can reach long-lived tokens, a tampered package may become a credential collection point even when the software payload looks minor. That is the same structural weakness highlighted in the broader supply-chain control model described by NIST SSDF (SP 800-218) and SLSA.
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 and OWASP API Security Top 10 address the attack and risk surface, while SLSA and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-02 — Secret Leakage | Package compromise becomes a secrets incident when credentials are exposed or harvested. |
| NHI-07 — Long-Lived Secrets | Long-lived credentials amplify post-compromise reuse after package tampering. | |
| Recommendation — Rotate exposed secrets and revoke any tokens that the compromised package could reach. Replace long-lived tokens with short-lived credentials and enforce rotation. | ||
| SLSA | Supply-chain provenance | Package tampering and install-time abuse are supply-chain integrity problems. |
| Recommendation — Verify provenance and restrict build steps that can execute untrusted package code. | ||
| NIST SP 800-53 Rev 5 | SI-7 — Software, Firmware, and Information Integrity | Tampered packages and unexpected scripts are integrity failures requiring validation. |
| AU-6 — Audit Record Review, Analysis, and Reporting | Outbound connections and workflow creation need log review to confirm secret theft. | |
| Recommendation — Validate package integrity and block untrusted code execution in build paths. Correlate build logs, workflow changes, and network telemetry for credential abuse. | ||
| OWASP API Security Top 10 | API2 — Broken Authentication | Stolen tokens turn package compromise into authentication abuse. |
| Recommendation — Revoke compromised tokens and require stronger authentication for publishing paths. | ||
Practitioner Guidance
What to prioritise: Treat unexplained outbound connections, new workflow files, and secret rotation alerts as evidence of possible credential exposure, not just noise from a bad package. If the compromised path touched build infrastructure or automation, expand scope to adjacent systems that share tokens, runners, or publishing rights.
What to verify: Confirm whether the package modification was isolated to the artifact itself, or whether install-time code had network reach, file-system access, or access to CI/CD variables. Also verify whether any rotated secret had been reused elsewhere, because reuse is what turns one compromise into multiple.
Decision rule: If the suspicious activity includes secret access or outbound exfiltration, start with credential containment and blast-radius reduction before spending time on code diff analysis. The code may explain how the attacker entered, but the secrets determine how far they can still go.
Practitioner takeaway: The moment the compromise starts looking like credential collection, the incident should be handled as both a supply-chain event and a secrets incident, because containment depends on revoking what the attacker can reuse.
Related resources from NHI Mgmt Group
- What are the signs that a Python supply chain compromise has moved from code tampering to active host abuse?
- What are the signs that a supply chain compromise has already moved beyond the original package installation in AI projects?
- What are the signs that a package supply-chain compromise has moved beyond the registry into active host execution?
- How do attackers turn a supply-chain incident into wider NHI compromise?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on October 10, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org