aboutsummaryrefslogtreecommitdiff
path: root/Justfile
blob: be6f8fb44f3b91b3665619cfc0b71022901bb9c2 (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
# Command runner for brew-sploits.
# Recipes use sh. Run `just --list` to view them.

name := "brew-sploits"

# List the recipes and their purpose
default:
	just --list

# Build the binary into ./brew-sploits
build:
	go build -o ./{{name}} ./cmd/brew-sploits

# Format the Go source
fmt:
	gofmt -w ./cmd ./fprox.go ./brew_vulns.go ./report.go

# Check that the Go source is formatted
fmt-check:
	test -z "$(gofmt -l ./cmd ./fprox.go ./brew_vulns.go ./report.go)"

# Run go vet across all packages
vet:
	go vet ./...

# Build every package without running anything
check: vet fmt-check
	go build ./...

# Build and run the scan
run: build
	./{{name}}

# Build, run the scan, and print only the exploited CVEs
run-exploited: build
	./{{name}} | jq '.exploited'

# Print the CLI help text
help:
	go run ./cmd/brew-sploits --help

# Remove build artifacts
clean:
	rm -f ./{{name}}