Skip to content

Promote NU3043 warning to error in NuGet.exe sign command #6551

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

kartheekp-ms
Copy link
Contributor

@kartheekp-ms kartheekp-ms commented Jul 11, 2025

Bug

Fixes: NuGet/Home#13962

Description

Updated NuGet.exe sign command to accept fingerprints from the SHA-2 family (SHA256, SHA384, or SHA512) instead of SHA-1. If a SHA-1 fingerprint or invalid value is passed, the commands raise an NU3043 error indicating that SHA-1 is insecure.

dotnet.exe changes have been merged already in NuGet/Home#13814.

PR Checklist

Refactored `ValidateCertificateInputs` to be parameterless and throw `ArgumentException` for invalid fingerprints or SHA-1 hash algorithm. Updated resource string for error code formatting. Renamed and modified tests to check for exceptions instead of warnings. Simplified helper method to return `CommandRunnerResult` and removed unnecessary parameter.
@kartheekp-ms kartheekp-ms requested a review from a team as a code owner July 11, 2025 17:40
@kartheekp-ms kartheekp-ms changed the title Promote NU3043 error to warning in NuGet.exe sign command Promote NU3043 warning to error in NuGet.exe sign command Jul 11, 2025
@kartheekp-ms kartheekp-ms marked this pull request as draft July 11, 2025 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DCR] Raise an error for SHA-1 fingerprints usage in NuGet.exe sign, mssign commands
1 participant