Skip to content

🐛 fix: filter headers at agent HTTP relay boundaries - #19264

Merged
hivecommons-hive[bot] merged 3 commits into
v5from
hive/adopt-19212
Nov 19, 2026
Merged

hivecommons-hive[bot] merged 3 commits into
v5from
hive/adopt-19212

Conversation

@hivecommons-hive

@hivecommons-hive hivecommons-hive Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Supersedes #19212 (adopted after CI went red and the contributor was unavailable; original commits by @Karibhou preserved).

Fixes #18993

This branch is #19212's head ce57dd986daf as pushed by @Karibhou (fork Karibhou/hive), unchanged. Last lane reason on the original: required-check-failing:coverage.

Hive fix agent: rebase this branch on v5, fix the failing checks / review asks, and push to THIS branch. Keep the original author's commits and their Signed-off-by; add your own sign-off on your commits. Do not open another PR.

Approval carried over: @clubanderson approved #19212 at head ce57dd986daf. The hive could not merge that head as-is (required-check-failing:coverage), so it re-authors it here; the approval travels with the content.

Karibhou and others added 2 commits November 19, 2026 04:57
Apply one header filter to the plain, inspected agent, and sandbox read HTTP relays. Keep proxy authentication local and filter before injecting upstream credentials.

Hive-Run: #18993
Hive-Plan: egress audit section 4
Hive-Spec: #18986-section-4
Signed-off-by: Karibhou <157208370+Karibhou@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 19, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nicholasjackson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 19, 2026
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#19253 ✨ customers: hub import disclosure, docs and consent views same files src/docs/security-model.md
#19266 🐛 Sentinel judges the PR's current head and clears its own stale alert same files src/docs/security-model.md

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Nov 19, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

CI triage (no code change needed): the red native-queue-policy job replayed a stale "skipped" verdict on a cosmetic size/L label flip. The underlying test/coverage failures in run 44549457617 were infrastructure: go mod download hit a proxy.golang.org stream INTERNAL_ERROR on test (scheduler 1/3). Fresh runs on ce57dd9 are in progress; no push made, so deferring to those. A re-run of the failed shard is the only action if it recurs.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: ce57dd986

@hivecommons-hive

hivecommons-hive Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

hive/awaiting-ci: CI pending - sweep will merge when green. Synced with v5 this kick.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

Review follow-ups: 3 open of 3 (below review.backlog.min_severity: P2)

Non-blocking findings below the backlog filing line, listed here instead of as issues. Tick them off as they are fixed; set review.backlog.min_severity: P3 to file every finding.

  • P3 info intent-alignment — Response-side and hop-by-hop stripping goes beyond issue text (src/crux/proxy/relay_headers.go:33): Issue names only request-side Proxy-Authorization, X-Forwarded-* and X-Hive-*. The PR also strips hop-by-hop, Connection-nominated and trailer fields and filters responses. It is documented in the ch…
  • P3 info security — Internal-caller exemption from header filtering relies on attribution integrity (src/crux/proxy/github_proxy_mitm.go:363): github_proxy_mitm.go:363 skips stripRelayRequestHeaders when agentName == internalCallerName and !proxyAdvisoryOK. Under advisory mode the filter is applied, so a caller-supplied name cannot bypass i…
  • P3 low correctness — No test pins the internal-caller exemption in proxyHTTPHost (src/crux/proxy/github_proxy_mitm.go:363): filterAgentHeaders = agentName != internalCallerName || p.proxyAdvisoryOK is only exercised through the 'scanner' advisory test; no test asserts that a trusted internal caller is left unfiltered or t…
Evidence bundle `#1926438604be` sha256:2c8e21ecef0ea7404cbb9841d7e61500c07c199220f53371eb937f5c3d53f417 — download from the dashboard or `hivectl review evidence #19264`.

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Nov 19, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style review at 38604be: no blockers. The comment on applySandboxReadAuth is stale (inline). Minor: stripRelayRequestHeaders and stripRelayResponseHeaders (relay_headers.go:22) have no doc comments, and setRelayTestResponseHeaders is also used for request fixtures, so its name is misleading. I could not confirm strings.SplitSeq is supported by the repo's Go version; CI should settle that.

-- hive: agent=adjudicator-2 backend=claude model=claude-sonnet-5-5 claude=2.1.328

@@ -295,7 +295,7 @@ func (r *SandboxReadRelay) readToken() string {
// attached only when d allows injection.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc comment above says this only rewrites Authorization, but it now also runs stripRelayRequestHeaders. Please update the comment.

@hivecommons-hive
hivecommons-hive Bot merged commit e56417a into v5 Nov 19, 2026
95 of 96 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the hive/adopt-19212 branch November 19, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) size/L Denotes a PR that changes 100-499 lines, ignoring generated files. stage/050-review-pending Review swarm requested; awaiting a verdict for the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[scanner] audit(egress): request smuggling and header hygiene table tests for the proxy relays

1 participant