Skip to content

fix(coderd): harden Azure identity certificate fetch (cherry-pick v2.32)#25277

Merged
jdomeracki-coder merged 1 commit into
release/2.32from
cherry-pick/harden-azure-identity-2.32
May 13, 2026
Merged

fix(coderd): harden Azure identity certificate fetch (cherry-pick v2.32)#25277
jdomeracki-coder merged 1 commit into
release/2.32from
cherry-pick/harden-azure-identity-2.32

Conversation

@jdomeracki-coder
Copy link
Copy Markdown
Contributor

Cherry-pick of 57b11d4 to release/2.32.

Backport of #25274.

Note

This PR was created by Coder Agents on behalf of a human.

Security improvements:
- Restrict cert fetches to a host+port allowlist (Microsoft and DigiCert
on 80/443).
- Route requests through a dedicated `http.Client` that resolves the
host once and dials the validated IP directly, preventing DNS rebinding.
- Reject loopback, private (RFC 1918 / IPv6 ULA), link-local, multicast,
unspecified, CGNAT, benchmarking, and IPv4-mapped IPv6 addresses.
- Cap the certificate response body at 1 MiB.
- Log the underlying error via slog and return a generic detail to the
caller to prevent information disclosure.

(cherry picked from commit 57b11d4)
@jdomeracki-coder jdomeracki-coder merged commit 25219f3 into release/2.32 May 13, 2026
31 of 32 checks passed
@jdomeracki-coder jdomeracki-coder deleted the cherry-pick/harden-azure-identity-2.32 branch May 13, 2026 15:34
@github-actions github-actions Bot locked and limited conversation to collaborators May 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants