News for hackers. Stuff that matters.
Re:Ignore 98% of dependency alerts: introducing Semgrep Supp... by freeqaz on Tuesday October 04, 2022 @01:54PM (#33084120)
Here is some code on GitHub that does call site checking using SemGrep: https://github.com/lunasec-io/lunasec/blob/master/lunatrace/...

(Note: I helped write that. We're building a similar service to the r2c one.)

You're right that patching is hard because of opaque package diffs. I've seen some tools coming out like Socket.dev which show a diff between versions. https://socket.dev/npm/package/react/versions

But, that said, this is still a hard problem to solve and it's happened before that malware[0][1] has been silently shipped because of how opaque packages are.

0: https://web.archive.org/web/20201221173112/https://github.co...

1: https://www.coindesk.com/markets/2018/11/27/fake-developer-s...

Re:Ignore 98% of dependency alerts: introducing Semgrep Supp... by feross on Tuesday October 04, 2022 @06:19PM (#33087877)
Thanks for mentioning Socket.dev :)

Looking at package diffs is super important because of the rise of "protestware". For example, a maintainer of the event-source-polyfill package recently added code which redirects website visitors located in Eastern European timezones to a change.org petition page. This means that real users are being navigated to this random URL in production.

See the attack code here: https://socket.dev/npm/package/event-source-polyfill/diff/1....

It’s very unlikely that users of event-source-polyfill are aware that this hidden behavior has been added to the package. And yet, the package remains available on npm many months after it was initially published. We think that supply chain security tools like Socket have an important role to play in warning npm users when unwanted ‘gray area’ code is added to packages they use.

Re:Ignore 98% of dependency alerts: introducing Semgrep Supp... by snowstormsun on Wednesday October 05, 2022 @12:32PM (#33097662)
Thanks for the pointers!