Use fail-open certificate revocation check in AzureDevOpsTask#16280
Use fail-open certificate revocation check in AzureDevOpsTask#16280
Conversation
Co-authored-by: agocke <[email protected]>
Updated comment to clarify reason for disabling certificate revocation checks.
| { | ||
| AllowAutoRedirect = false, | ||
| CheckCertificateRevocationList = true, | ||
| // Certificate revocation checks are disabled due to widespread failre on Ma |
There was a problem hiding this comment.
Done. Certificate revocation checks are now only disabled on macOS using !RuntimeInformation.IsOSPlatform(OSPlatform.OSX). On Windows and Linux, the checks remain enabled. (4ea705a)
…evOpsTask Co-authored-by: agocke <[email protected]>
Co-authored-by: agocke <[email protected]>
Co-authored-by: agocke <[email protected]>
|
Does this open up our requests to someone spoofing AzDo with a revoked certificate? Any risk here to disabling this? @bartonjs was suggesting a more targeted disabling of just |
|
It looks like we had the better fix here -- arcade/src/Microsoft.DotNet.Arcade.Sdk/src/DownloadFile.cs Lines 131 to 156 in 7d717a4 @mmitche added, mentioning it was for mac in 346db01 @copilot can you improve this to use the method in the linked code, preserving the other |
|
@copilot respond to comments |
Co-authored-by: agocke <[email protected]>
Improved to use the fail-open pattern from DownloadFile.cs with fine-grained
Good point. I've updated to use the more secure fail-open approach with |
|
I don't know why the PR includes a new copy of nuget.exe, but the cert-related code looks good. |
|
@copilot Delete copy of nuget.exe |
Co-authored-by: agocke <[email protected]>
|
/ba-g android timeout in running helix work items (after submitting job - so it's past the portion changed by this PR) |
…#16280) Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: agocke <[email protected]> Co-authored-by: Andy Gocke <[email protected]>
…#16280) Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: agocke <[email protected]> Co-authored-by: Andy Gocke <[email protected]>
…#16280) Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: agocke <[email protected]> Co-authored-by: Andy Gocke <[email protected]>
Certificate revocation list (CRL) checks cause widespread build failures on macOS where CRL endpoints are inaccessible (dotnet/dnceng#6410). This change implements a fail-open certificate revocation check that maintains security while handling unknown revocation status gracefully.
Changes
SocketsHttpHandlerwith fine-grainedX509ChainPolicyfor .NET (Core/5+)System.Security.Cryptography.X509Certificatesnamespace for certificate chain policyAllowAutoRedirect = falsesetting.nuget/nuget.exefileSecurity behavior:
Behavior by framework:
SocketsHttpHandlerwith fine-grained verification flags for fail-open behaviorHttpClientHandlerwith full revocation checks enabledThis approach follows the established pattern from
DownloadFile.csand recommendations from security experts.To double check:
This pull request was created as a result of the following prompt from Copilot chat.
Original prompt
This pull request was created as a result of the following prompt from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.