|
1 | 1 | # dependency-vulnerability-scanner |
2 | 2 |
|
3 | 3 | This repository provides scripts to quickly check if a repository uses certain vulnerable dependencies. |
| 4 | +Supported package managers: npm, pnpm, yarn |
4 | 5 |
|
5 | 6 | ## How to use |
6 | 7 |
|
@@ -38,20 +39,40 @@ curl -O https://github.com/comsysto/dependency-vulnerability-scanner/releases/la |
38 | 39 | Example output: |
39 | 40 |
|
40 | 41 | ```bash |
41 | | -Starting dependency scan... |
42 | | -Found 1 package-lock.json files |
43 | | -Checking ucp-test... (100% complete) |
| 42 | +Dependency Vulnerability Scanner |
| 43 | +================================= |
| 44 | + |
| 45 | +📦 Scanning NPM packages (package-lock.json)... |
| 46 | +Found 19 package-lock.json files: |
| 47 | + - test-project/package-lock.json |
44 | 48 |
|
45 | 49 | Scan complete. Found 1 occurrences: |
46 | | -ucp-test/package-lock.json - uses: ["zuper-stream@2.0.9"] |
| 50 | +test-project/package-lock.json - uses: ["zuper-stream@2.0.9"] |
| 51 | + |
| 52 | +✅ Scan complete! |
| 53 | +Total matches found: |
| 54 | + - 1 in NPM projects |
| 55 | + - 0 in Yarn projects |
| 56 | + - 0 in PNPM projects |
| 57 | +``` |
| 58 | + |
| 59 | +## How to test locally |
| 60 | + |
| 61 | +Build the binary and move it to some root folder that contains node projects: |
| 62 | + |
| 63 | +```bash |
| 64 | +cd node/src |
| 65 | +go build -o scanner && cp ./scanner ~/your-workspace |
| 66 | +cd ~/your-workspace |
| 67 | +./scanner |
47 | 68 | ``` |
48 | 69 |
|
49 | 70 | ## How to add new affected dependencies |
50 | 71 |
|
51 | 72 | 1. Check if you can find a list of vulnerable packages in a structured way, |
52 | 73 | e.g. https://github.com/wiz-sec-public/wiz-research-iocs/blob/main/reports/shai-hulud-2-packages.csv |
53 | 74 | 2. Use `utils/extract-versions.sh` to extract the affected versions from the CSV file |
54 | | -3. Add the strings to `var deps` in main.go, following the existing format |
| 75 | +3. Add the strings to `dependencies.go`, following the existing format |
55 | 76 |
|
56 | 77 | ## How to build new versions |
57 | 78 |
|
|
0 commit comments