-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[release/9.0] Improve dev-certs export error message #58471
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
During a recent security review of the dev-certs tool, we observed that on export it would create a directory that was potentially world-readable (e.g. based on permissions inherited from the parent directory). We decided it would be more appropriate to let users make the decision of who should have access to the directory. Unfortunately, this removal of functionality broke some app authors' workflows. When dev-certs is run directly, the `--verbose` output makes it clear what went wrong and what needs to happen, but the non-verbose output that appears when another tool does the export is less helpful. This change introduces a new top-level error state for an export failure caused by a non-existent target directory to make it clearer how to fix broken workflows. The behavior changed in #57108, which included a backport of #56985, and shipped in 8.0.10. For #58330
/backport to main |
Started backporting to main: https://github.com/dotnet/aspnetcore/actions/runs/11372969393 |
amcasey
reviewed
Oct 16, 2024
Approved over email |
BrennanConroy
approved these changes
Oct 16, 2024
This was referenced Jul 22, 2025
Closed
chore: Bump Microsoft.AspNetCore.Components.WebAssembly.DevServer and 6 others
Markinatorina/MSAVA#7
Merged
This was referenced Aug 11, 2025
This was referenced Aug 18, 2025
Open
Open
This was referenced Aug 25, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-commandlinetools
Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI
Servicing-approved
Shiproom has approved the issue
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of #58470 to release/9.0
Improve dev-certs export error message
Mention non-existent target directory
Description
During a recent security review of the dev-certs tool, we observed that on export it would create a directory that was potentially world-readable (e.g. based on permissions inherited from the parent directory). We decided it would be more appropriate to let users make the decision of who should have access to the directory. Unfortunately, this removal of functionality broke some app authors' workflows. When dev-certs is run directly, the
--verbose
output makes it clear what went wrong and what needs to happen, but the non-verbose output that appears when another tool does the export is less helpful. This change introduces a new top-level error state for an export failure caused by a non-existent target directory to make it clearer how to fix broken workflows.The behavior changed in #56985.
For #58330
Customer Impact
Development certificate export fails. This is most likely to break scenarios where the app is being developed (or validated in CI) in a container.
Regression?
I believe this made it into RC1, so it's only a regression from preview releases (and 8.0).
Risk
A slightly different string is printed - everything else stays the same.
Verification
Packaging changes reviewed?