Repository navigation
·
18 commits
to master
since this release
Immutable
release. Only release title and notes can be modified.
v1.5.0 (2026-10-16)
The custom response modifier and the guard-core-go v4.4.0 floor (the reference-alignment engine)
Fixed
- The
CustomResponseModifieris applied (#41):Engine.ModifyResponseis applied in the reference order (security headers, CORS, modifier, then CORS again). With a modifier configured the adapter holds the whole handler response in memory until the handler returns, so streamed responses are delivered at the end; without one nothing changes. - The response wrapper exposes
Flusher,HijackerandUnwrap(#43):Unwrapletshttp.NewResponseControllerreach the deadline and full-duplex controls,Flushdelegates to the real writer so SSE and other streaming handlers reach the client as they write (a no-op while a modifier holds the response), andHijackdelegates to the underlying writer and leaves a hijacked connection alone (no response pass, no held release).
Changed
- Raised the engine floor to
github.com/rennf93/guard-core-go/v4 v4.4.0, the reference-alignment release. The v4.4.0 engine adds the per-request scan time budget (Detection.MaxScanSeconds,pattern_timeout), honorsDetection.ThreatScoreThreshold, canonicalizes client identity (IPv4-mapped addresses, brackets, zones), follows the reference IP list precedence, answers an unresolved client address with 403 underFailSecure, applies dynamic rule versions over the base config, fixes the filtered-value scan bypass (GHSA-w9j2-2m3v-5hcc) and scans the Cookie header one pair at a time. No adapter code change was needed: the full gate (gofmt, vet, staticcheck, unit and integration tests with Redis, the 100% coverage gate, govulncheck) is green on the new floor. - Behavior to know before upgrading. The v4.4.0 engine changes what some requests get, and this adapter passes it straight through. A request that reaches the engine with an empty remote address is now answered 403
Client address could not be determinedunderFailSecure(the adapter always hands over the connection's remote address, so only a server that leaves it empty is affected). IPv4 blacklist, whitelist, exempt and emergency entries now also match clients that connect as::ffff:a.b.c.d, and an IPv4 CIDR no longer trusts a mapped peer as a proxy. A configured whitelist now decides alone (a route whitelist overrides the route blacklist and skips the global lists, a global whitelist overrides the global blacklist), so an entry that relied on the blacklist beating the whitelist must move. A dynamic rule version no longer stacks on the previous one, so a field a version does not set returns to the base value. A request that spendsDetection.MaxScanSeconds(default 10.0) of regex CPU time is blocked with apattern_timeoutthreat, and a setDetection.ThreatScoreThresholdnow changes verdicts. A passive-mode log match on the old penetration wording needs updating. - Docs and CI: the examples and docs no longer claim the default address headers need a manual
ExcludedDetectionHeadersentry or thatEnableAgentfails validation (both verified against the engine), the weekly lint runs on Go 1.26.x,codeql-actionmoves to 4.38.3, the docs links and mkdocssite_urlpoint at the live site root, and the README gets the content-parity pass.