aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: e2dbd1d5e230583fe33e99f143d788770c23f5cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# brew-sploits

Scan Homebrew for vulnerabilities that already have known exploits.

`brew-sploits` reads the vulnerabilities that `brew vulns --json` reports for your installed formulae. For every real CVE identifier, it asks the fprox service whether public proof-of-concepts or exploitation activity exist. It prints one JSON report to stdout.

## Output

The report has four fields.

- `exploited` lists the CVEs with known exploits.
- `not_exploited` lists the CVEs with no known exploits.
- `non_cve` lists the vulnerability IDs that are not CVEs, such as `OSV-*`.
- `vulnerable_packages` lists the unique Homebrew formulae that the CVEs affect.

For a single CVE, the tool marks it as exploited when either proof-of-concepts exist or proof-of-exploited is true.

## Requirements

- Go 1.26 or later
- Homebrew, with `brew` on `PATH`
- A live internet connection

## Build

Run `just build`. Or build the binary directly:

```sh
go build -o brew-sploits ./cmd/brew-sploits
```

## Usage

Run the binary to scan and print the report. Use `--help` for the option list
and `--version` for the version.

```sh
./brew-sploits
./brew-sploits | jq '.exploited'
./brew-sploits --help
```

## Limitations

The tool skips any CVE that the lookup fails to resolve. It writes a warning to stderr for each skipped CVE. It never labels a skipped CVE as exploited or not exploited.