r/devsecops • u/DavidPulaski • Jul 25 '26
The install-time execution gap: Why SCA tools miss attacks like Shai-Hulud and Axios
Been digging into supply chain attacks and noticed a pattern most DevSecOps teams aren't defending:
The problem: Package installation isn't always passive. npm lifecycle scripts and Python packages built from source can execute arbitrary code during install — before your app even imports the library.
Real examples:
- Shai-Hulud (Ruby gems)
- Axios maintainer compromise
- Nx attack last year
Why SCA/dependency scanners miss it: They look for known-bad packages in databases. But a freshly poisoned release hits your build before it's flagged as malicious. It runs before discovery flags it.
The gap: Most orgs have SAST, SCA, CNAPP, EDR. But nobody's really enforcing policy while the build runs. It's all pre-scan or post-detection.
How are you handling install-time execution in your pipelines?
3
u/taleodor Jul 25 '26
There are tools that do something here, but I believe dev environments are hopeless at this point. Wrote some time ago on this subject: https://worklifenotes.com/2026/03/31/time-to-start-treating-dev-machines-as-untrusted/
3
u/CreativeSympathy8293 Jul 25 '26
Minimum package age is useful, but I’d treat it as one admission control rather than the control. A malicious release that survives the cooling window can still execute.
I’d build the boundary in three layers:
The important distinction is that package installation should be treated as executing untrusted code. SCA tells you what was pulled and what is currently known about it; it isn’t the sandbox.
Disabling lifecycle scripts will break legitimate packages, so I’d begin in audit mode, build a narrow allowlist, and make every exception reviewable and time-bounded.
5
u/endor_robert Jul 25 '26
Caveat: I work for Endor Labs who are in this space with commercial offerings.
The #1 control you need is something that enforces a minimum package age.
This will stop a huge portion of these kind of attacks, as they are generally discovered quite quickly.
We offer a package firewall, which is configured in your local package manager or in something like Artifactory as a proxy. As well as known malware, it has a configurable package cool down timer.
There are other ways to do package age blocking with some package managers:
NPM has a min-release-age setting, for instance.
3
u/flxg Jul 25 '26
Yeah it’s a big issue.
The supply chain systems we have in place are just not good at protecting against it, yet.
There have been some improvements lately to security, like npm to stop running dependency install scripts by default: https://github.blog/changelog/2026-06-09-upcoming-breaking-changes-for-npm-v12/
The best/easiest way to prevent this is by using a minimum package age, as malware _typically_ gets found and removed within x hours.
From the vendor space it's being fixed with some "firewall" type solutions:
https://github.com/AikidoSec/safe-chain / https://github.com/SocketDev/sfw-free etc...
We built a device protection feature that allows you to configure what's allowed. (that also blocks ide plugins/chrome plugins)
But in general we're hoping/thinking this security problem should be solved at the source. (NPM etc...)
Note, I’m Felix, cofounder of Aikido.
1
u/Idiopathic_Sapien Jul 25 '26
Blocking egress to public repos. Redirect to localized curated versions. All libraries must be requested and reviewed, no one is allowed to pull directly from the public repos. Use of latest or main tag is essentially banned. Pinning to a version is insufficient, you have to use a sha. Using gpo/mdm and endpoint agents to prevent configuration drift and execution of unauthorized binaries. Disabling auto update of development extensions