By NHI Mgmt Group Editorial TeamDomain: Cyber SecuritySource: StepSecurityPublished June 16, 2026

TL;DR: Package Configs audits how developer machines fetch npm and Python packages, because compromised versions can execute locally, steal secrets, and propagate through publishing tokens, according to StepSecurity. The security issue is not just package trust, but whether every endpoint actually enforces registry routing, cooldown, and auth hygiene consistently.


At a glance

What this is: This is an analysis of how npm and Python supply chain attacks reach developer machines through package-manager configuration drift, and how Package Configs exposes registry, cooldown, and auth gaps.

Why it matters: It matters because IAM and NHI teams must treat developer endpoints as credential-bearing trust boundaries, where exposed registry tokens and misrouted package traffic can bypass central policy.

By the numbers:

  • 28.65 million new hardcoded secrets were detected in public GitHub commits in 2025 alone, a 34% year-over-year increase and the largest single-year jump ever recorded.
  • 64% of valid secrets leaked in 2022 are still valid and exploitable today, proving that detection alone is not enough without automated revocation.

👉 Read StepSecurity's analysis of package configs and developer machine supply chain risk


Context

npm and PyPI supply chain attacks succeed when a trusted package reaches a developer machine and runs with the developer's own access. The control problem is rarely only at the registry layer. It is whether endpoint configuration, package-manager precedence, and exposed credentials allow a machine to bypass the intended protection path, which is why this is a genuine NHI and secrets governance issue as much as a software supply chain issue.

The article's core claim is that central policy is not enough if the laptop is misconfigured. A project-level .npmrc, an unsupported cooldown setting, or a hardcoded registry token can silently remove the machine from the secure path even when the organisation believes it has enforced policy. That makes fleet-wide configuration visibility the missing operational control, not another abstract best practice.


Key questions

Q: How should security teams reduce npm and PyPI supply chain risk on developer machines?

A: Focus on the endpoint, not only the registry. Security teams should verify the effective package source on every machine, enforce cooldown where supported, and eliminate hardcoded registry tokens. The goal is to make malicious versions harder to consume and credentials harder to harvest from local configuration files.

Q: Why do developer build hosts increase the impact of package supply-chain attacks?

A: They often hold the exact assets attackers want: SSH keys, cloud tokens, signing material, registry credentials, and cached service secrets. A malicious package can harvest those non-human identities from the build context and then expand into connected systems. That makes endpoint hygiene and identity hygiene the same problem during a supply-chain incident.

Q: What breaks when secure registry policy is not enforced on every endpoint?

A: A single machine can drift back to the public registry, bypass cooldown, and fetch newly published malicious packages before they are vetted. Once that endpoint is outside the secure path, the central policy no longer protects it, and the attacker only needs one exposed workstation to start spreading.

Q: How do organisations measure whether malicious package controls are actually working?

A: Measure the time between package request, policy decision, and block, then test whether a malicious package can reach a privileged context in that interval. Also track how many build and developer environments still expose reusable secrets. If hostile packages can execute before a decision or can read high-value credentials, the control is not working.


Technical breakdown

How package-manager precedence creates hidden exposure

Package managers resolve configuration through layered precedence across global, user, and project scope. That means a checked-in project file can override central defaults and redirect traffic to the public registry without alerting the security team. In practice, the risk is not only malicious packages but configuration drift that changes the effective trust boundary on a single workstation. For npm, pnpm, bun, yarn, and pip, the effective source of truth is whichever config wins at runtime, not the policy the team intended.

Practical implication: inventory the effective registry per machine, not just the declared enterprise policy.

Why cooldown is a runtime supply chain control

Cooldown is a time-based defence that blocks very recent package versions from being installed until they age enough to be vetted. It is especially useful against self-replicating worms that publish malicious updates and rely on immediate consumption. The control only works if the local package manager supports it and the endpoint is actually configured to enforce it. Without that, a freshly published malicious version can still land on a developer machine during the window when defenders have the least visibility.

Practical implication: verify cooldown support and enforcement on every endpoint before relying on it as a containment layer.

How exposed registry credentials turn developer machines into propagation points

Registry tokens on disk are high-value non-human credentials because they can be harvested locally and reused to publish additional malicious versions. When tokens are hardcoded into config files instead of referenced through environment variables, the secrets are persistent and easy for malware to collect. This is a classic non-human identity failure mode: a long-lived credential sits on an endpoint with more access than the task requires, and a worm can convert one machine compromise into many package compromises.

Practical implication: eliminate static registry tokens on endpoints and replace them with governed, short-lived credential paths.


Threat narrative

Attacker objective: The attacker wants to turn one compromised developer workstation into a credential source that can spread malicious packages and expose more secrets.

  1. Entry occurs when a malicious package version is installed on a developer machine through the package manager path that the endpoint is actually using.
  2. Credential harvesting follows as the malware reads local registry tokens and other secrets from configuration files on disk.
  3. Escalation happens when the stolen publishing token is reused to publish infected versions of additional packages, turning one compromise into a broader supply chain event.
  4. Impact is downstream secret theft and repeated propagation across developer fleets and package ecosystems.

NHI Mgmt Group analysis

Developer machines have become credential-bearing trust boundaries, not just build endpoints. Once package installs can execute with the developer's access, local configuration becomes part of the identity attack surface. This shifts supply chain governance from central repository policy alone to endpoint-enforced controls over registry routing, cooldown, and credential storage. Practitioners should treat the workstation as a governed identity environment, not a passive consumer.

Configuration drift is the real failure mode behind package supply chain exposure. The control usually exists somewhere, but the machine is not always pointed at it. A project .npmrc that overrides the secure registry, an older package manager that cannot enforce cooldown, or a static token on disk each creates a different bypass path. That is a policy-to-endpoint enforcement gap, and it is the gap adversaries exploit first. Teams should measure effective control coverage, not policy declaration.

Secrets governance and package governance are converging in the same threat pattern. Malware does not care whether a token came from an app pipeline, a developer laptop, or a build system. If the credential can publish packages or unlock registry access, it is an NHI that needs lifecycle control, exposure detection, and offboarding. The governance model must therefore connect secrets management, endpoint hygiene, and software supply chain controls into one operating picture. Practitioners should collapse these silos before the next worm does it for them.

Fleet-level visibility is the named control gap this article exposes. The missing concept is effective package-path assurance, meaning you can prove every machine is actually using the secure registry and cooldown settings you believe are in force. Without that proof, central policy is informational, not protective. This is a governance problem as much as a technical one, and it belongs in identity and supply chain risk reporting together. Practitioners should report drift by machine, not by policy document.

Self-replicating supply chain worms reward the fastest control loop, not the best written policy. The practical advantage goes to teams that can identify exposed machines, exposed tokens, and unsupported package-manager versions before the next malicious publish is consumed. This is where NHI governance and endpoint security meet operational resilience. Teams should prioritise detection-to-remediation speed over static compliance narratives.

What this signals

Package configuration is becoming an identity control plane for developer endpoints. Once registry routing and cooldown enforcement are endpoint-dependent, teams need to verify that the machine is actually using the governed path. That is where identity and secrets management intersect with software supply chain security: if the endpoint can override the policy, the policy is not the control.

The practical signal for programmes is that exposed tokens and misrouted package installs should be reported together. A laptop with a hardcoded registry credential is both a secrets issue and an NHI governance issue, because the token can authorise publishing, not just access. Teams should align endpoint detection, secrets scanning, and identity governance around the same fleet view.

Effective package-path assurance should become a measurable control objective. Use fleet reports to prove each machine is behind the approved registry, has cooldown enabled, and does not store static credentials in config files. That is the difference between declarative policy and enforceable control, and the difference will matter more as supply chain worms accelerate.


For practitioners

  • Audit effective registry paths across the fleet Resolve the actual registry used by each developer machine across global, user, and project scopes, then flag any endpoint that can reach the public registry outside the approved secure path.
  • Enforce cooldown where package managers support it Confirm that cooldown is enabled on every endpoint, and identify machines running package-manager versions too old to enforce it so they can be upgraded or isolated.
  • Remove hardcoded registry tokens from config files Scan .npmrc and related config files for static tokens, then replace them with environment-based references or short-lived governed credentials.
  • Track package-manager drift by machine, not by policy Build a per-device view that shows whether each endpoint is actually behind an internal registry, has cooldown active, and avoids direct public registry access.
  • Prioritise endpoints exposed to recent malicious package waves Triage developer machines that are missing secure registry routing or cooldown first, because they are the shortest path from package compromise to secret theft.

Key takeaways

  • Developer machine configuration, not just central registry policy, determines whether npm and PyPI supply chain defences actually work.
  • Hardcoded registry tokens and missing cooldown create the exact local conditions that worms use to steal secrets and propagate.
  • Identity, secrets, and endpoint teams need one fleet-level view of effective package-path control, or drift will keep reopening exposure windows.

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 MITRE ATT&CK address the attack and risk surface, while NIST CSF 2.0, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-03NHI-03 covers secrets exposure and lifecycle weaknesses mirrored in this endpoint package risk.
MITRE ATT&CKTA0006 , Credential Access; TA0010 , ExfiltrationThe attack pattern centres on local credential harvesting and downstream secret theft.
NIST CSF 2.0PR.AC-4The issue is inconsistent access enforcement across endpoints and package paths.
NIST SP 800-53 Rev 5IA-5Static registry tokens are authenticator management failures.
CIS Controls v8CIS-5 , Account ManagementCredential governance on endpoints depends on knowing which accounts and tokens exist on devices.

Track package-supply-chain exposures to credential access and exfiltration behaviours, then isolate affected endpoints.


Key terms

  • Package-manager precedence: The order in which a package manager reads configuration from global, user, and project locations to determine its effective behaviour. In practice, the highest-precedence setting can override central policy, which makes endpoint-level inspection necessary to understand where packages really come from.
  • Cooldown policy: A time-based package control that prevents very recent versions from being installed until they are old enough to be vetted. It reduces exposure to malicious releases that are published and consumed quickly, but it only protects systems where the package manager supports the feature and it is actually enabled.
  • Registry token: A registry token is a credential that authorises publishing, modifying, or accessing software packages in a registry or marketplace. It behaves like a non-human identity when it can trigger automation, so compromise of the token can let an attacker alter downstream software at scale.
  • Effective Registry: The effective registry is the package source a tool resolves after applying all configuration layers and defaults. It is the only registry value that matters in practice, because it reflects where the install request will really go at runtime.

What's in the full article

StepSecurity's full blog covers the operational detail this post intentionally leaves for the source:

  • Per-device Package Configs output showing registry resolution, cooldown state, and auth surface across macOS, Windows, and Linux.
  • Configuration examples for npm, bun, yarn, and pip that help teams see where project-level files override central policy.
  • Workflow guidance for sorting exposed machines by cooldown gap, registry drift, and hardcoded token exposure.
  • Implementation context for Dev Machine Guard deployment through existing MDM or EDR tooling.

👉 StepSecurity's full post includes the fleet-level configuration details and rollout context behind Package Configs.

Deepen your knowledge

The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security, and secrets management. It helps identity and security practitioners connect credential lifecycle control to the wider governance model their programmes depend on.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 18, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org