aboutsummaryrefslogtreecommitdiff
path: root/Justfile
diff options
context:
space:
mode:
Diffstat (limited to 'Justfile')
-rw-r--r--Justfile44
1 files changed, 44 insertions, 0 deletions
diff --git a/Justfile b/Justfile
new file mode 100644
index 0000000..be6f8fb
--- /dev/null
+++ b/Justfile
@@ -0,0 +1,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}}