Watch for Python processes reaching metadata endpoints, unexpected secret-store activity, new outbound JSON exfiltration, GitHub token misuse, and service persistence on developer endpoints. These signals indicate the package is moving from execution to collection and onward to externalised access.
What it looks like when a dependency compromise becomes credential theft
The shift usually starts when the package stops behaving like ordinary execution and begins probing for identity material, session state, or environment-scoped secrets. At that point, the compromise is no longer just supply-chain execution risk, it is an access event with potential reuse across source control, cloud, CI/CD, and developer workstations.
One of the clearest signs is a process that looks for metadata services, local secret stores, or token files it would not need for its stated function. That pattern matters because it suggests the code is trying to discover credentials that can be exported, replayed, or used to pivot into higher-value systems.
Another strong indicator is outbound traffic that changes from ordinary telemetry or update checks into structured JSON collection and exfiltration. When a dependency begins packaging environment variables, configuration blobs, or authentication artefacts for external transmission, the threat has moved from execution to credential harvesting.
How credential theft shows up across developer and build environments
In developer endpoints and build systems, the warning signs are often indirect before they become obvious. You may see unexpected access to GitHub sessions, package registries, secret managers, or browser-stored tokens, followed by new persistence mechanisms that keep the attacker inside the workflow after the original install event.
Persistence is especially important because credential theft rarely stays isolated to one host. A compromised dependency that can keep running, relaunching, or re-triggering in a pipeline can repeatedly collect fresh secrets as developers sign in, rotate tokens, or approve new releases.
At the workflow level, the practical clue is not just that a package executed, but that it behaved like a collector. Sudden interest in SSH keys, cloud credentials, API tokens, session cookies, or CI variables is what separates a noisy compromise from one that is actively building an access path.
Why the transition matters more than the initial infection
The dangerous point is when the compromise starts turning transient execution into durable access. That is the difference between a package crash or malicious callback and an attacker gaining credentials that can be reused from another host, another account, or another layer of the stack.
For teams that depend on shared developer tooling, the real risk is blast radius. A single poisoned dependency can expose secrets from local workstations, secret managers, build jobs, and source control integrations at the same time, which makes the downstream impact much broader than the original install point.
For a broader view of how stolen tokens, exposed secrets, and excessive permissions fit together in enterprise abuse paths, Top 10 NHI Issues is a useful reference point. For a breach-focused perspective on how stolen secrets and credentials are used after compromise, The State of NHI & AI Agent Breach Report 2026 maps the access paths attackers tend to abuse next.
Risk and Threat Considerations
A dependency compromise becomes materially worse once it starts harvesting credentials because the attacker no longer needs the original package to remain present. Even a short-lived malicious run can produce long-lived access if it captures tokens, keys, or session artefacts that were not designed for rapid detection or revocation.
Failure mechanism: The malicious code enumerates local metadata endpoints, secret stores, browser sessions, and CI environment variables, then exfiltrates the collected material in a structured format that is easy to replay elsewhere.
Impact: Stolen credentials can enable source-code access, cloud control-plane access, registry abuse, and lateral movement from developer endpoints into production-adjacent systems.
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 NIST SP 800-53 Rev 5 sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-02 — Secret Leakage | Dependency compromise often turns into secret exfiltration from endpoints and builds. |
| NHI-07 — Long-Lived Secrets | Stolen tokens matter most when they remain valid long enough for reuse. | |
| NHI-05 — Overprivileged NHI | Stolen credentials are more damaging when they carry excessive permissions. | |
| Recommendation — Detect and revoke exposed secrets before they are replayed elsewhere. Shorten secret lifetime and rotate credentials rapidly after suspected exposure. Reduce privilege so harvested credentials cannot reach high-value systems. | ||
| OWASP API Security Top 10 | API2 — Broken Authentication | Stolen tokens and session material enable replayed authentication to services. |
| Recommendation — Harden token handling and invalidate compromised authentication material quickly. | ||
| NIST SP 800-53 Rev 5 | IA-5 — Authenticator Management | The issue centers on protecting, rotating, and revoking credentials after exposure. |
| Recommendation — Manage authenticator lifecycle tightly and rotate exposed credentials immediately. | ||
Practitioner Guidance
What to verify: Treat metadata access, secret-store calls, and outbound JSON as higher-confidence indicators when they occur together, because the combination is much more meaningful than any single process event. Confirm whether the package touched identity-bearing material rather than merely reaching out to an external endpoint.
What to prioritise: Revoke exposed tokens first, then rotate any credentials that could be replayed from developer machines, CI jobs, or package publishing accounts. If the package touched GitHub, cloud, or secret-manager paths, assume credential theft until you can prove otherwise.
Common mistake: Teams often focus on removing the malicious dependency and miss the access that has already left the endpoint. Once secrets may have been collected, containment has to include revocation, replay risk assessment, and review of downstream authentication logs.
Practitioner takeaway: The key judgement is whether the compromise has crossed from execution into secret collection, because that is the point where incident response must shift from malware removal to access remediation.
Related resources from NHI Mgmt Group
- What are the signs that a SaaS phishing compromise has already moved beyond credential theft?
- What are the signs that a phishing attack has moved from credential theft to organisational compromise?
- What are the signs that email security controls are failing against credential theft and account compromise?
- 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 11, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org