fix(config): #715 run RequireSecureScheme in the env credential resolver #733

Merged
hexajon merged 2 commits from issue-715-cred-resolver-scheme into main 2026-10-06 18:07:57 +00:00
Owner

Summary

GetCredentialsWithSource returned the env MADTEA_URL and token without the cleartext-http guard. Every current caller re-runs the guard, so the gap is latent, but a future caller could skip it. Add RequireSecureScheme in the env-var branch, like the sibling GetCredentials branch and ADR 0041: the check belongs at the point that carries the token. An https or loopback setup is unaffected. Only a non-loopback http env URL with a token is refused.

Closes #715

## Summary GetCredentialsWithSource returned the env MADTEA_URL and token without the cleartext-http guard. Every current caller re-runs the guard, so the gap is latent, but a future caller could skip it. Add RequireSecureScheme in the env-var branch, like the sibling GetCredentials branch and ADR 0041: the check belongs at the point that carries the token. An https or loopback setup is unaffected. Only a non-loopback http env URL with a token is refused. Closes #715
fix(config): #715 run RequireSecureScheme in the env credential resolver
Some checks failed
ci / gate (pull_request) Has been cancelled
ci / mcp-conformance (pull_request) Has been cancelled
drift / govulncheck (pull_request) Has been cancelled
drift / surface-diff (pull_request) Has been cancelled
drift / forgejo-smoke (pull_request) Has been cancelled
fd7e0d6c9d
GetCredentialsWithSource returned the env MADTEA_URL and token without the
cleartext-http guard. Every current caller re-runs the guard, so the gap is
latent. A future caller could use the result and skip the check.

Add RequireSecureScheme in the env-var branch, like the sibling GetCredentials
branch and ADR 0041: the token-security check belongs at the point that carries
the token. The function has no error channel, so a refusal gives the all-empty
not-configured result. An https or loopback setup is unaffected. Only a
non-loopback http env URL with a token is refused.
Merge branch 'main' into issue-715-cred-resolver-scheme
Some checks failed
ci / gate (push) Successful in 14m39s
ci / mcp-conformance (pull_request) Successful in 1m53s
drift / govulncheck (pull_request) Has been skipped
drift / surface-diff (pull_request) Successful in 44s
drift / forgejo-smoke (pull_request) Has been skipped
ci / mcp-conformance (push) Successful in -17s
drift / govulncheck (push) Has been skipped
drift / surface-diff (push) Successful in -18s
drift / forgejo-smoke (push) Has been skipped
ci / gate (pull_request) Failing after 14m55s
ca10694047
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea!733
No description provided.