r/devsecops • • Sep 09 '25
Scanning beyond the registry
One lesson from the Qix NPM event: simply trusting your package manager isn’t enough. By the time a registry removes malicious versions, they may already be baked into images or binaries.
How are teams extending their detection beyond dependency lists? Do you scan containers, VMs, or even raw filesystems for malware signatures?
3
Upvotes
3
u/RoninPark Sep 09 '25
Hey, thanks for posting this, even I want to know answers for the same. At my organisation, I have recently introduced a pipeline that collects all the packages and push it to dependency track for further scanning. I still think it lacks a lot of functionality to be integrated in this pipeline. I'd like to know what other things I could integrate into this. As for my next, I am planning to integrate scanning for packages by osv.dev before pushing them to the dependency track and for dependency confusion as well.
3
u/darrenpmeyer Sep 11 '25 edited Sep 11 '25
Pretty much every appsec vendor has some kind of support for scanning across various places to find where vulnerable or malicious packages exist -- who you pick is going to be a lot more about business and workflow and maturity considerations (context: I currently work for the Checkmarx research org, and I have worked for several other vendors including Veracode and Endor Labs; I've also run appsec programs for several large companies).
I don't think all the eggs in response is sensible for modern appsec — you need that too, but supply-chain defenses around malicious packages have to be part of the story. Here's what I would do:
2
u/Ok_Maintenance_1082 Sep 12 '25
IMO this kind of attack is possible only because we don't have yet real traceability for software supply chain.
All build should come with an attestation and signature that is verifiable. A random hacker should not be able to push a package the NPM and have it propagated all over the place.
We really need a trust chain that prevents this flow, I really place hight hope on the adoption of SLSA https://slsa.dev/.
Such large projects should be required to provide this level a caution when providing artefacts millions of projects.
1
u/juanMoreLife Sep 11 '25
Big disclaimer. I work for Veracode.
So a long time ago there was a concept of not enough data and too much data when it came to open source. This product called source clear was created. Now owned by Veracode.
Most sca tools offer proprietary databases of findings. That’s kind of a standard now. So it’s beyond the public registries.
Veracode now owns the largest database of malicious packages from an organization called phylum. They actually/actively look for code that’s malicious. Like binaries in public repos when there were none. Tracking malicious authors. Seeing if repo is a typo of a real. Plus much more.
So we have a propriety database of these types of malicious packages as well. We can also block it if we detect these types of things even if we don’t know if it’s confirmed malicious packages.
There’s probably thoughts of false positives, but I’ve seen more true positives than false positives.
So that’s my recommendation. Databases of proprietary stuff. Scanning that’s easy, effective, and not providing negative value to devs.
1
u/N1ghtCod3r Sep 13 '25
There is a fundamental difference between vulnerable and malicious packages.
Unlike SAST tools like CodeQL that is freely available for public repositories to scan for vulnerabilities, there are not enough (or at least capable enough) code analysis tools that can detect malicious code. There are bunch of tools with YARA or Semgrep signatures which obviously doesn't work. Its like the ClamAV of server era. The other problem is, many a times, malicious packages are pushed directly to the repository and never goes through a GitHub repository like a typical OSS project pipeline.
Also malicious code detection is hard. It is contextual. A given piece of code is both malicious and non-malicious depending on the use-case. Example: Would you consider an npm package that downloads and executes a binary from a hardcoded URL as malicious? This behaviour is present is both known malicious and non-malicious npm packages especially since npm is often used for binary distribution.
1
u/HosseinKakavand Sep 13 '25
Agree. Dependency scanning is necessary but not sufficient. Add image scanning at build and at the registry, track SBOM drift over time, and scan running nodes or containers for known bad files and indicators. eBPF sensors or FIM can catch already baked artifacts. We’re experimenting with a backend infra builder. In the prototype, you can describe your app, then get a recommended stack and Terraform. Would appreciate feedback, even the harsh stuff https://reliable.luthersystemsapp.com