Proposal: on-device malware detection open IOC feed #12624
Replies: 2 comments 11 replies
|
While I don't reject this idea, this claim is not valid:
Historical data shows that all the malware was detected and removed from the registry in hours or even minutes. You are wrong saying "cooldowns hope the other users get attacked first". No, this is not about hope that other users get attacked first. Scanning IS happening. Socket.dev and multiple other companies are doing the scanning. Recent poisoned packages were detected in 15 minutes and removed from the npm registry soon after. Hence, delayed updates do solve the problem currently. If you want additional protection, you can use additionally something like the socket firewall. Regarding patching vulnerable packages, nothing prevents you from doing that. You just need to explicitly run "pnpm update pkg@<patched version>". About scanning done by pnpm, I don't feel comfortable doing it. If we add such feature to pnpm and it will fail to detect malware, it will be a huge reputational hit for us. I am not taking that risk with a free open source product. As I mentioned earlier, there are companies that focus on this, and if they provide a service for scanning packages, we can use them. If you want to add an opt-in plugin to pnpm that scans, that could probably be done via hooks: https://pnpm.io/pnpmfile This is my personal opinion. You shouldn't close the issue. Others can have a different opinion. |
|
microsoft GitHub are doing the scanning of Microsoft NPM before publish now https://github.blog/changelog/2026-07-28-npm-publish-time-malware-scanning-and-dual-use-metadata/ What a novel idea! |
Uh oh!
There was an error while loading. Please reload this page.
Background
I see pull/11158 as a temporary bandaide.
As long as there is any publish first (controlled by registry) then install delay, there is a delay getting legit updates like patches for exploited vulns to users.
To be blunt, the malware is only prevented from installing if it is detected, until the cooldown expires, and the cooldown does not trigger anyone to scan for you - and the NPM registry discussions are leaning towards a 7 day cooldown default without scanning before publishing.
We see the PHP registry (packagist) doing scanning, and they're holding initial package publishing until scanning is complete, so there is no need for a user imposed cooldown which stops good patches that fix exploitable vulns. It's not clear why NPM discussion is preferring to not scan despite the clear benefits and success seen with PHP ecosystem - perhaps NPM have a plan they are not ready to go public with and the non-consentual blocking of users security patches is the price of negligence they are willing to take on for that plan? Who o=would know?
Proposal
We can offer pnpm users on-device malware detection compensating for the lack of NPM registry scanning adoption plans, using an open IOC feed, otherwise the
minimumReleaseAgeis meaningless. AllminimumReleaseAgeoffers when there is no scanning is a bleak expectation someone else (other package manager users) will be infected and implies a hope they report it before pnpm users are infected too.The problem is, if he npm package manager, yarn, bun, all move to 7 days - then pnpm defaulting to 1 day means pnpm users are the users expected to be infected first and the rest of them have 6 more days for US to report that to the registry and save them from infection.
It is a race to the bottom, and only the package manager with the longest cooldown wins - but ALL users lose because the longer the minimumReleaseAge / cooldown the longer they are being blocked from real security patches that stop exploits.
Data proves Exploits are a imminent threat
Why am I referring to exploits when the topic is mlware? Because the only defence from exploits comes in the form of a patch, which the NPM registry and package managers are preventing users applying with minimumReleaseAge / cooldowns.
But how bad are thee exploits? They;re mainly targetted at comercial entities and governments (my day job).
%%{init: {'theme':'base','themeVariables':{ 'doneTaskBkgColor':'#FFC107','doneTaskBorderColor':'#8a6d00', 'taskBkgColor':'#FB8C00','taskBorderColor':'#8a4b00', 'critBkgColor':'#d7514e','critBorderColor':'#8a1c1a', 'activeTaskBkgColor':'#2E7D32','activeTaskBorderColor':'#14401a', 'textColor':'#9e9e9e','gridColor':'#9e9e9e', 'sectionBkgColor':'transparent','altSectionBkgColor':'transparent', 'taskTextColor':'#1a1a1a','taskTextDarkColor':'#1a1a1a', 'taskTextOutsideColor':'#9e9e9e','taskTextLightColor':'#ffffff' }}}%% gantt dateFormat YYYY-MM-DD axisFormat %b %d section Can you install the fix Before publish, no fix released yet, is being exploited :done, a, 2026-01-27, 5d Day 0 to 1, pnpm cooldown holds patch from users being exploited : b, 2026-02-01, 1d Day 1 to 7, only pnpm users can be infected by malware, but they get the exploits patched :crit, c, 2026-02-02, 6d Day 7 onward, all package managers allow exploit patching but undetected malware too :active, d, 2026-02-08, 5dBasically, without scanning, cooldowns hope the other users get attacked first. it's that simple. and cooldowns put you at worse risk from exploits - the data is in, we can't ignore it.
If there is interest in getting malware IOCs into a bloom filter, and pnpm mechanism for keeping that in sync with an endpoint. I'll donate time and IOC feed until we can point at OSM or just stay on this, whatever is best for the community.
I have no PR prepared, I am hoping for some support to kick this off.
All reactions