You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[MOCA SBX] Refuse to send a credential over plain HTTP (403 plaintext_credential) #1481
Priority: P1 · Part of the Cortex × MOCA SBX epic · Not in #905's breakdown · MOCA contract: MI1 §8.5 item 3
Problem
A guest can send an absolute-form GET http://api.github.com/… through the proxy. If the proxy injects a credential into that request, the secret crosses the network in cleartext.
What Cortex does today
static-inject never reads pctx.Scheme (context.go:98-109 defines it; staticinject/plugin.go has no reference to it). An absolute-form http:// request handled by serveOutbound (forwardproxy/server.go:316-330) would get the credential injected in the clear.
What MOCA needs
A plain-HTTP request to a host that has a credential gets 403 plaintext_credential, with nothing injected and nothing sent upstream.
Plain HTTP to other allowed hosts is still subject to the allow list and the SSRF checks (issues 8 and 9).
Design questions
Should this be a check in every injector, or a single gate before any credential plugin runs?
Done when
The interception-slice conformance case "plain-HTTP request to a host with a credential → 403 plaintext_credential, nothing injected" passes.
Activity
test: pin the extproc :scheme wiring for the plaintext gate
fix: gate the plaintext refusal on outbound only (#1481)
docs: name the backend hop as the inbound operator's job (#1481)
Fix: Refuse static-inject credentials over plain HTTP (403 plaintext_…
Feat: Deny-by-default egress allow list for the forward proxy (#1548)