security: a credential resolver returns a token without the cleartext-http check #715
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
sixfold-space/madtea#715
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happens
madtea resolves forge credentials through a fallback chain. One resolver,
GetCredentialsWithSource(internal/config/config.go:545-549), has an environment-variable branch that returns the URL and token without runningRequireSecureScheme- the guard that refuses to send a token over a non-loopbackhttp://connection. The host-keyed and other resolvers run the guard; this branch does not.Not exploitable today
Every token-bearing request re-runs the guard where it attaches the token, in
doAuthedRequest(internal/config/request.go:26-30), and all three current callers of the resolver are verified safe. So nothing leaks today. The gap is latent: a future caller of this resolver could use its result directly and skip the guard, sending a token over cleartext. Low severity: latent, not currently reachable.Decision
Add
RequireSecureSchemein the resolver itself, so the guard cannot be skipped by a future caller. This matches ADR 0041 - the token-security check belongs at the point that carries the token, not at each caller. Non-breaking: anhttpsor loopback setup is unaffected; only a non-loopbackhttpenv URL carrying a token is refused, which ADR 0041 already forbids everywhere else.Acceptance criteria
GetCredentialsWithSourcerunsRequireSecureSchemebefore it returns a token.httpURL.hexajon referenced this issue2026-10-05 12:34:16 +00:00