Subscribe to the Non-Human & AI Identity Journal

What should organisations do first after detecting suspicious package installation behaviour?

Preserve evidence, stop the affected build paths, and inventory which identities and secret stores were reachable from those systems. Then look for repository markers, unexpected script files, and commit patterns that indicate the attacker already exfiltrated data before containment.

Why This Matters for Security Teams

Suspicious package installation is rarely just a software hygiene issue. It is often the first visible sign that a build system, developer workstation, or CI runner has been turned into a delivery path for credential theft, dependency poisoning, or covert data exfiltration. The immediate risk is not the package itself but the identities and secrets reachable from that execution context, including vault tokens, signing keys, and repository credentials.

Current guidance suggests treating package activity as an identity incident as much as a supply chain incident. NHI Mgmt Group research shows that 79% of organisations have experienced secrets leaks, and 77% of those incidents caused tangible damage, which is why containment has to start with identity reachability, not just malware cleanup. The same pattern is reflected in the Ultimate Guide to NHIs — Key Challenges and Risks, which highlights how widespread secret exposure and excessive privilege amplify blast radius. NIST’s Cybersecurity Framework 2.0 reinforces the need to identify, contain, and recover in that order.

In practice, many security teams encounter the real damage only after a package install has already touched secret stores or pushed malicious changes into a trusted pipeline.

How It Works in Practice

The first move is to preserve evidence, then stop the affected build paths so the attacker cannot continue to install, publish, or execute through the same trust chain. That includes pausing the specific CI jobs, quarantining the runner or workstation, and freezing any automation account that can reach package registries, source control, or secret managers. The goal is to prevent further identity abuse while keeping enough telemetry to reconstruct what happened.

From there, inventory every identity and secret store the compromised system could reach. That means service accounts, workload tokens, registry credentials, signing keys, cloud access roles, and any cached secrets on disk or in environment variables. The NHI Lifecycle Management Guide is useful here because it frames discovery, rotation, offboarding, and revocation as a continuous process, not an afterthought. Security teams should also review package-manager artefacts for repository markers, unexpected script files, install hooks, and commit patterns that suggest data was staged or exfiltrated before containment.

  • Preserve logs, package metadata, and process history before rebuilding or reimaging.
  • Disable the affected build lane, runner pool, and any automation identity tied to the event.
  • Rotate reachable secrets in priority order, starting with signing and publishing credentials.
  • Search for unexpected post-install scripts, dependency changes, and suspicious commits.
  • Compare repository activity against known good baselines and recent release windows.

For broader control mapping, NIST SP 800-53 Rev. 5 supports evidence preservation, access restriction, and incident response handling. These controls tend to break down when package execution happens inside ephemeral CI containers that share cached credentials and mutable workspace volumes, because the attacker can move faster than the containment workflow.

Common Variations and Edge Cases

Tighter containment often increases operational disruption, requiring organisations to balance speed of shutdown against release pressure and developer productivity. That tradeoff becomes sharper when the suspicious package ran in a shared runner, a long-lived self-hosted agent, or a monorepo pipeline with broad token reuse.

Best practice is evolving on how much to revoke immediately versus what to stage for later rotation, but there is no universal standard for this yet. In high-trust environments, the safer default is to assume the build system exposed more than the obvious package path and to treat related secrets as potentially compromised. The Top 10 NHI Issues research is especially relevant because excessive privilege, weak visibility, and poor offboarding are common failure points after this kind of event. When the package came from a public registry, the LiteLLM PyPI package breach illustrates how quickly a trusted dependency can become a credential collection point.

Teams should be especially cautious when the same identity is used across development, test, and production. In those environments, a single package install can expose enough material to pivot into signing, publishing, or deployment actions before detection catches up.

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 Suspicious installs often expose long-lived NHI secrets that must be rotated fast.
OWASP Agentic AI Top 10 A1 Autonomous build agents can execute untrusted package steps with hidden tool access.
CSA MAESTRO GOV-02 Agentic and automated pipelines need governance for execution authority and blast radius.
NIST AI RMF GOVERN AI-enabled automation needs accountable governance when package actions become risky.
NIST CSF 2.0 RS.MA-2 Incident response requires containment, analysis, and evidence handling after detection.

Assign ownership for automated build decisions and review them after suspicious activity.