fix: prevent credential-bearing HTTP downgrades #2704
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 581 lines diff across 7 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.381
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2704"
general
weight: 0.35
hiddeco
<!-- entire-trail-link-start -->
https://entire.io/gh/entireio/cli/trails/1522
<!-- entire-trail-link-end -->
Summary
Close credential-bearing HTTPS-to-HTTP downgrade paths in the remote-helper proxy, API client, control-plane client, cloud dispatch client, and cell catalog resolver.
SkipTLSdoes not authorize plaintext.http.ErrUseLastResponseunchanged.Thanks to @wernerkasselman-au for responsibly reporting these HTTPS-to-HTTP downgrade paths and providing detailed follow-up findings that helped strengthen the fix.
Context
Follow-up to the class addressed in #2224 and #2261 / entireio/auth-go#25. Those fixes protect OAuth clients; these CLI-owned bearer-header clients need their own redirect policy. The API client's existing cross-host guard remains essential because its transport reapplies Authorization.
The reported redirect scenarios require a server-issued downgrade. This change does not establish that an untrusted repository alone can trigger credential theft, or that production servers issue such redirects.
Verification
go test -race.mise run fmtandmise run lintpass; lint rerun on the final tree before push.mise run test:e2e:canarypasses: 56 Vogon scenarios and 4 Roger Roger scenarios.mise run checkpasses in full, including lint, unit/integration tests with race detection, and deterministic canaries. The earlier local OpenCode seed-cache failure did not recur on this run.<!-- CURSOR_SUMMARY -->
---
<!-- /CURSOR_SUMMARY -->