Backend for the CSP Reporter REST API using Fiber, GORM, Asynq and Sentry.
- Go >= 1.23.1
- PostgreSQL >= 16.3
- Redis >= 7.2
- Go
- EditorConfig for VS Code
- Even Better TOML
- Prettier - Code formatter
- Markdown All in One
- Rainbow CSV
go mod tidy
go install github.com/air-verse/air@latest
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
go install golang.org/x/vuln/cmd/govulncheck@latest
go install golang.org/x/tools/cmd/deadcode@latest
mkdir -p keys
go install github.com/go-jose/go-jose/v4/jose-util@latest
(cd keys && jose-util generate-key --use sig --alg EdDSA && mv jwk-sig-*-priv.json signing-private.json && mv jwk-sig-*-pub.json signing-public.json)
(cd keys && jose-util generate-key --use enc --alg ECDH-ES+A256KW && mv jwk-enc-*-priv.json encryption-private.json && mv jwk-enc-*-pub.json encryption-public.json)
go build -ldflags='-s -w' -a -installsuffix cgo -o ./bin/csp-reporter .
chmod +x csp-reporter
csp-reporter
air
golangci-lint run ./...
govulncheck -show=traces ./...
deadcode -test ./...
redis-cli
SMEMBERS access-tokens:revoked
SADD access-tokens:revoked "<JTI>"
SREM access-tokens:revoked "<JTI>"
For more information, refer to the official documentation for sets:
Download latest version from releases.
./asynqmon --max-payload-length 5000
go install github.com/hibiken/asynq/tools/asynq@latest
asynq dash