Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,25 @@ jobs:
cache: false
- name: Test
run: go test ./...

fuzz:
runs-on: ubuntu-latest
env:
GOTOOLCHAIN: local
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: '1.27'
cache: false
- name: Fuzz smoke
# Short per-target budget (~75s total). See internal-docs/FUZZ.md.
run: |
set -euo pipefail
for target in FuzzVerifyRequest FuzzVerifyViaMessage FuzzSignAndVerifyHMAC FuzzHMACViaMessage FuzzNewMessage; do
echo "::group::fuzz $target"
go test -run='^$' -fuzz="$target" -fuzztime=15s .
echo "::endgroup::"
done
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Optional foreign JWS uses `lestrrat-go/jwx/v4` via `NewJWSSigner` / `NewJWSVerif
### Testing conventions

- `signatures_test.go` contains the full RFC 9421 test vector suite (134 KB) — do not modify without understanding the spec.
- `fuzz_test.go` has fuzz entry points; seed corpus lives in `testdata/fuzz/`.
- `fuzz_test.go` has fuzz entry points (`FuzzVerifyRequest`, `FuzzVerifyViaMessage`, `FuzzSignAndVerifyHMAC`, `FuzzHMACViaMessage`, `FuzzNewMessage`); see [internal-docs/FUZZ.md](internal-docs/FUZZ.md). Seed corpus: `f.Add` plus optional `testdata/fuzz/`.
- `http2_test.go` and `trailer_test.go` cover HTTP/2 and trailer-header edge cases.
- Tests use `github.com/stretchr/testify` assertions and `github.com/andreyvit/diff` for readable diffs.

Expand Down
Loading