v4.4.19
Scope guard hardening v2 — four targeted fixes
- agent:
scopeHostTokenSplitsplits on=,?,#,@plus a newextractEmbeddedURLssweep so URLs hidden in query params, fragments, or userinfo surface as standalone tokens. - agent:
extractHostsFromArgscaps tokenization at 8 KiB per arg viatruncateForScopeScanwith a UTF-8 rune-boundary-safe trim. Oversize args fall through to allow, never reject. - agent:
(*Agent).redactOutOfScopeHostsreplaces every OOS host span inadd_notekey/value with[redacted: out-of-scope host]before the gate runs, so notes can no longer launder OOS hostnames intoread_notes. - web:
isBlockedTargetresolves DNS exactly once per call (via package-levellookupHostshim) and threads the resolved IP set into both the self-listener check (newipsMatchLocalInterface) and the private-range check.
Verification
go vet ./..., go build ./..., go test ./internal/agent/... ./internal/web/... -count=1, and go test -race on the same packages all pass clean.
PR
Spec
.kiro/specs/scope-guard-hardening-v2/