tests: cover signing, verification, cancellation, and untrusted-input parsers #10
Labels
No labels
nagonag
nagonag/ignore
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
heiko/mailseal#10
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The repository has no direct tests for
signorverify, even though they contain the trust decision, concurrency, wire-format creation, and output routing. Existing tests cover normalization, query generation, local TCP transport, and response formatting, but not end-to-end security invariants.The custom RFC 5322 parser and
x-signatureJSON/token decoder consume attacker-controlled input and currently have no fuzz tests. Race testing passes only because the untested signing concurrency is not exercised.Checklist: #82 (separate deterministic tests from integrations), #83 (race testing), #90 (use testing facilities); also Go fuzzing guidance.
Proposed test architecture
Timestamperfactory so sign tests use deterministic fakes/httptest, never public TSAs.--maxboundaries.rfc822.Parse, canonicalization, header JSON decoding, and token chunk reassembly with bounded inputs.go test -race -shuffle=on ./...in CI.Acceptance criteria
Reviewed against
948b7a9onmaster(Go 1.26.2).