Documentation
¶
Overview ¶
Package obs is the shared logging facade for internal/* packages (ADR-0003). It lets leaf packages emit log lines and sanitise user input without importing package main. package main wires the sink once at startup (SetSink) so these lines flow into the same rotating/JSON logger; before that, and in unit tests, the default sink writes to stderr.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Sanitize ¶
Sanitize strips control characters from s to prevent log injection (CWE-117).
This is an INDEPENDENT copy of package main's sanitizeLog (proxy.go), kept separate on purpose: CodeQL's CWE-117 query recognises the inline strings.ReplaceAll sanitiser at each call site, and delegating across a package boundary risks losing that recognition. The two copies are tiny and each behaviour-tested; the property (no control byte survives) is the contract.
Types ¶
This section is empty.