Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/authz/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ func shouldSkipSubsequentAuthorization(method string) bool {
// "Unauthorized" message -- err (an authorizer failure) can carry policy detail that
// security.md forbids returning to callers, so it is logged server-side instead.
// Cedar's evaluation context can embed decoded JWT claim values (see the claim-keys-
// only rule in authorizers/cedar/core.go), so err must never be promoted to a
// structured field routed to an aggregator beyond this log line.
// only rule in authorizers/cedar/core.go), so err must not be surfaced to the client,
// nor copied into additional log lines or fields beyond the single Warn below.
func handleUnauthorized(w http.ResponseWriter, msgID interface{}, err error) {
if err != nil {
slog.Warn("authorization denied", "error", err)
Expand Down
4 changes: 3 additions & 1 deletion pkg/mcp/tool_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,9 @@ func processEventStream(
} else if len(buffer) >= 1 && buffer[len(buffer)-1] == '\r' {
linesep = []byte("\r")
} else {
return fmt.Errorf("unsupported separator: %s", string(buffer))
// Length only, not the buffer: buffer is the full pre-filter payload
// (e.g. the unfiltered tools/list), and this error is logged upstream.
return fmt.Errorf("unsupported SSE line separator in %d-byte buffer", len(buffer))
}

var linesepTotal, linesepCount int
Expand Down
Loading