Example malicious packages to test with

Open
#56 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
node.js
Domain
cli, security

Research direction

Start with the sample malware packages documentation at docs.socket.dev/docs/sample-malware-packages and reproduce the comparison using socket npm install browserlist and sfw after npm cache clean --force. Check how the two commands classify the package and determine whether the issue is behavior or demo coverage. Done means the expected blocking behavior or a documented safe demo package is established.

Written by the indexing model from the issue text.

Description

I was reviewing: https://docs.socket.dev/docs/sample-malware-packages

If for example I try to do

socket npm install browserlist

It successfully avoids installing it.

But sfw will happily install it, on a fresh npm cache (npm cache clean --force).

The docs specify:

Confirmed malware: Packages verified as malicious through human review. Socket Firewall Free will block these packages.

So, is browserlist not considered "confirmed malware"? Is that why it doesn't block it? I think a separate issue might be, ideally it would act the same way as Socket CLI, considering this is supposed to be the successor. I'd want Socket CLI's behavior in this case.

My real question is: is there a "safe" malicious package we can use to demo installing through sfw that is successfully blocked? Obviously I don't want to use a real malicious package (and any known ones would be removed already anyway).

This is for a course demo.

I cannot even demo that sfw helps avoid risky packages given the behavior above. As you can imagine, it doesn't inspire confidence to see that the Firewall doesn't act as strict or prevent risky package installations like the Socket CLI does.

Dominant language
No language data
Stars
271
Forks
8
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SocketDev/sfw-free

All issues in SocketDev/sfw-free

Similar issues

More CLI issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.