Repository navigation
fix: harden audit relay against control-char injection and queued waits - #4
Merged
Merged
Conversation
Replace every C0, DEL and C1 control character in the MSG with a space (not just CR/LF), compare the Authorization header by SHA-256 digest so timing does not leak the token length, and let a request waiting for the syslog connection give up when its context ends. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Security review of the bridge (2026-11-24). Fixes, by severity:
buildSyslogonly replaced CR/LF, so ESC, NUL, BEL and C1 bytes reached the collector (terminal-escape / log-viewer injection)selectonctx.Done()subtle.ConstantTimeCompareon raw values leaks the token lengthNot changed here (noted for the Gameplane chart review): with
api.audit.webhook.authSecretRefunset the bridge accepts any POST; the chart's NetworkPolicy limits ingress to the API pod only whennetworkPolicies.enabled. Making the bridge fail closed would break current installs, so it belongs in a chart change.Checked and sound: RFC 5424 header fields validated, octet-counting framing, 64 KiB body cap, server timeouts, TLS 1.2+ with verification, no secrets logged, distroless nonroot image.
New tests only (
TestBuildSyslogStripsControlChars,TestForwarderSendHonoursContextWhileBusy); no existing test changed (checked by a separate test-diff review).specs.mdupdated.Generated by Claude Code