-
Notifications
You must be signed in to change notification settings - Fork 258
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
Separate concerns of package source mapping and CPM #13797
Comments
I hit this issue. I enabled CPM and am now having to figure out the package feed issue (which is a bit hard) at the same time. That was unexpected, unfortunate, and stalling my PR. It's certainly not helping with CPM adoption. |
This was done in #11505. The 2 features can and function independently. What is a thing today is that CPM encourages best practices such as PSM adoption, in the spirit of secure by default. cc @aortiz-msft |
Yep, this issue is proposing that PR is reverted or the functionality is not tightly coupled to each other in this way. |
I think the idea of "we'll turn on all the security features at once" is very much NOT in the spirit of secure by default. |
Some thoughts:
I think this is a good example of where our team had differing opinions, we had appropriate discussions, and we found an agreeable compromise. I also think we did the right thing for customers, push them towards a more secure configuration while providing them a clear path forward if they are not willing or able to use package source mapping. |
This discussion is about warnings, less about overall UX and adoption. I came to this feature area fresh. I was confused and surprised when I needed to deal with PSM. I then looked at two use cases within our own org and found one disabled PSM based on a false premise and another used PSM but in name only (all wildcards). That's a very low sample size, but it is not a good sign when our own org is (IMO) misusing this feature. Here is the one case I mentioned: https://github.com/dotnet/arcade/blob/7e8b8f4f321c8671aa01b53567d31aaa4950706f/Directory.Packages.props#L6 |
I've talked to dnceng about package source mapping in the past, but the problem is that when a new version of .NET is being built, it dynamically creates new Azure Artifacts feeds, and the Arcade SDK dynamically adds those feeds to the nuget.config file of the repo being built. How to maintain correct package source mapping configuration, when feeds are programmatically added and which packages they contain appears to be non-deterministic (as far as I could tell, from my discussions with them), is something that most customers (even within Microsoft) will not experience. So, there are technical reasons why Arcade enabled repos that take part in Maestro/.NET builds cannot (currently) use package source mapping. |
NuGet Product(s) Affected
NuGet SDK
Current Behavior
Today, CPM is "tightly coupled" with package source mapping when there are multiple feeds detected and CPM is enabled.
Desired Behavior
CPM should not be affected by package source mapping.
Package source mapping should not be affected by CPM.
If behaviors are desired to drive best practice adoption, a separate property / experience should be considered that people can customize. i.e.
<NuGetStrictMode>
or similar.TL;DR - You should not run into package source mapping issues when enabling CPM. And vice versa. We should remove this coupling.
We could consider keeping the warning for multiple sources regardless of CPM.
Additional Context
No response
The text was updated successfully, but these errors were encountered: