-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Prevent copy/paste of password and warn #44761
base: main
Are you sure you want to change the base?
Conversation
I'm not sure who is best to review, but I agree we should see if we can improve this from an SFI perspective. @bradygaster is deeply involved in that so he may know a good reviewer. Also adding @vijayrkn. |
This uses all of |
I'd strongly consider changing the doc to some mechanism that does not ingest secrets of any kind into MSBuild via Properties - once something is an MSBuild property it is visible to all Task and MSBuild logic that runs in that same build, so unless you are strictly auditing the build logic you use (including build logic from NuGet packages, etc) you're exposing yourself. |
This comment has been minimized.
This comment has been minimized.
Yes, good spot @KalleOlaviNiemitalo. Edited for clarity. |
Could MSBuild detect Common annotated security keys and exclude them from logs? |
Other mitigations for production environments:
|
EDITChanged To make it harder to global copy/paste and use the same PW for two different services. |
For production deployments: | ||
|
||
* Use MSBuild to create artifacts, but without deployment, so no credentials are required. Deploy apps as a separate non-MSBuild step that has fewer dependencies and is easier to audit. | ||
* Use deployment keys with short expiration times. A server in a separate root of trust is used to manage the deployment keys. Secrets aren't exposed to the project, ensuring that even if the project is compromised, the root of trust remains secure. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KalleOlaviNiemitalo please review and use the suggestion feature to submit an improvement.
This falls under the company wide SFI (Secure Future Initiative)
Warn about password risk. Make it more difficult to copy/paste a password in config files and command lines.
@marcpopMSFT @sayedihashimi please recommend a reviewer
Contributes to dotnet/AspNetCore.Docs#33861