fix: add validation for header values #5933
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.36) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 189 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.314
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5933"
general
weight: 0.35
gavinkflam
What type of PR is this?
<!--
Your PR title should be descriptive, and generally start with type that contains a subsystem name with
()if necessaryand summary followed by a colon. format
chore/docs/api/feat/fix/refactor/style/test: summary.Examples:
"docs: fix grammar error"
"feat(translator): add new feature"
"fix: fix xx bug"
"chore: change ci & build tools etc"
"api: add xxx fields in ClientTrafficPolicy"
Before raising a PR, please go through this section of the developer guide, https://gateway.envoyproxy.io/contributions/develop/#raising-a-pr
-->
<!--
NOTE: If your PR contains any API changes (changes under
/api), we recommend you to separate these API changes intoa new PR, and we will review the API part first. It will save you lots of implementation time if the API get accepted.
-->
What this PR does / why we need it:
A single malformed header can stall the entire controller. We need to validate header values according to RFC 7230.
The proposed changes catch invalid header values and flag them in status messages.
Which issue(s) this PR fixes:
<!--
Automatically closes linked issue when PR is merged.
Usage:
Fixes #<issue number>, orFixes (paste link of issue).-->
Fixes #5901
<!--
For any non-trivial changes, you need to provide a brief description of the changes in the release notes.
Please add the description to the release-notes/current.yaml file and include this file in the PR.
-->
Release Notes: Yes