Skip to content

[MOCA SBX] Refuse to send a credential over plain HTTP (403 plaintext_credential) #1481

Closed

Description

@pdettori

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

  1. added
    enhancement
    on Oct 22, 2026
  2. self-assigned this
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions