Join our Newsletter — 33% off our NHI Course
Home› FAQ› Threats, Abuse & Incident Response› What signs show that a dependency install is…
Threats, Abuse & Incident Response

What signs show that a dependency install is abusing install-time execution?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated October 12, 2026 Domain: Threats, Abuse & Incident Response

Look for unexpected postinstall hooks, unexplained outbound HTTPS from build jobs, file drops in temporary directories, and install logs that mention runner hostnames or secret file paths. Those signals usually indicate that the package is doing more than the application needed.

What install-time execution is really doing

Install-time execution is the moment a dependency runs code during installation, rather than only when your application explicitly imports or calls it. That behavior is not automatically malicious, but it expands trust into the supply chain, because the install step can read the build environment, touch the filesystem, and reach out to the network before the package ever becomes part of the running application. For broader open source supply chain context, OpenSSF is a useful starting point, and NHIMG’s LiteLLM PyPI package breach shows why package install behavior deserves scrutiny.

The practical question is not whether a package uses a lifecycle hook, but whether the hook does more than the installation task requires. A benign installer might compile assets, generate metadata, or verify prerequisites. An abusive one often leaves a trail that is visible in CI logs, temporary directories, network telemetry, or unexpected process behavior.

Signals that the install step crossed the line

The clearest sign is an unexpected postinstall or setup hook that does work unrelated to packaging. If the dependency claims to be a library but the installer spawns shell commands, starts extra processes, or touches unrelated paths, treat that as suspicious until you understand the intent.

Another strong indicator is outbound HTTPS from build or install jobs. A package that only needs local files should not usually make fresh external connections during install. When a dependency contacts remote infrastructure, especially with no documented update or telemetry purpose, the install step may be staging, exfiltrating, or fetching second-stage content.

File drops in temporary directories are also important because they often show the package is unpacking payloads, writing helper scripts, or preparing persistence for later execution. If those files appear alongside references to runner hostnames, secret mount paths, or token locations in the logs, the package is likely inspecting the environment rather than simply setting itself up for use.

How to tell normal packaging from abuse

Normal install-time execution is narrow, predictable, and documented. It should have a clear dependency-related purpose, a bounded set of file operations, and no need to inspect secrets or environmental identifiers. Abuse usually looks broader: the code checks the host, probes for credentials, downloads extra content, or behaves differently depending on whether it is inside a CI runner, container, or developer workstation.

That distinction matters because install-time code runs before most teams apply runtime controls. Even if the application is never launched, the install step can still leak environment data, alter build artifacts, or create trust in a compromised package version. In supply chain terms, the installer itself becomes part of the attack surface.

Risk and Threat Considerations

Install-time execution is risky because it can operate before defenders expect application code to be active. A malicious package can abuse the build phase to steal secrets, stage payloads, or fingerprint the environment while appearing to be a routine dependency setup step.

Failure mechanism: The package abuses lifecycle hooks to run arbitrary code, reach external services, or inspect CI and host metadata during installation, when the process often has broad access to files and environment variables.

Impact: The result can be credential exposure, poisoned builds, hidden persistence in artifacts, or silent compromise of downstream systems that trust the resulting package or container image.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK addresses the attack and risk surface, while OWASP ASVS, SLSA, CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP ASVSV15 — Secure Coding and ArchitectureInstall-time execution abuse is a software supply-chain coding and architecture issue.
Recommendation — Review dependency install hooks and block package behavior that exceeds documented build-time needs.
SLSASupply Chain Levels for Software ArtifactsThe question concerns malicious behavior during dependency installation in the software supply chain.
Recommendation — Require provenance and hardened build steps so dependency installs cannot silently alter artifacts.
CIS Controls v8CIS-17 — Incident Response ManagementSuspicious install-time execution can indicate supply-chain compromise and needs response handling.
Recommendation — Treat unexpected install-time network or secret access as an incident and preserve build evidence.
MITRE ATT&CKT1059 — Command and Scripting InterpreterAbusive install hooks often execute shell or scripting commands during package installation.
Recommendation — Map installer-spawned commands to T1059 and hunt for script execution in build telemetry.
NIST CSF 2.0PR.DS-08 — Integrity of data-at-rest is protectedMalicious installs can tamper with files, artifacts, and build outputs before release.
Recommendation — Protect build artifacts from unauthorized modification during dependency installation.

Practitioner Guidance

What to verify: Check whether the package documents any install-time behavior, and compare that against the observed actions. If the installer needs network access, secret access, or shell execution, require a specific justification rather than assuming it is routine.

Decision rule: If the hook touches secrets, makes unexplained outbound connections, or writes outside expected package paths, treat it as a supply chain incident candidate, not a noisy installer. Contain the build, preserve logs, and rotate any exposed credentials before continuing.

Practitioner takeaway: The key judgment is whether the install step is bounded to packaging work or is already behaving like an untrusted program. Once a dependency starts acting on the build environment, you should evaluate it as code execution with supply chain impact, not as a harmless install script.

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.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 12, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org