You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Release a new version with an update ref to 'Azure.Identity' #2568
We'll look to have this scheduled for our next release
Reacted by Rihan Arfan, Fernando Callejon, Johan Bennink, Camilo Terevinto, Felipe, vip32, Asbjørn Riis-Knudsen, Brandon, Cristi Pufu and Christian Klutz
this is a poor experience for consumers. for anyone who has CVE scanning turned on it breaks builds. and they need to explicitly add an azure reference to work around it. so for us it means doing a temporary hack on approx 40 projects just to build again. note that we dont even use azure.
if the sqlclient wants force a transitive azure ref on non azure users, then you should pro-actively release cve related fixes for azure.
Reacted by Valdis Thomann, Paulo Mattos, Greg Bielleman, Gérald Barré, Rasmus Hansen, matejskubic, Daniel Marbach, Toni Wenzel, Muhammad Azeez, Chris Canal and 44 more
if the sqlclient wants force a transitive azure ref on non azure users
or a version (stripped down?) without this nuget and whatever it offers? or how about the default version doesn't have this at all and a 2nd version has this so people who want to use Azure.Identity with their SqlClient can use that version. For the 99% rest of us, we don't need to worry about this transitive dep anymore/then.
Reacted by Haukinger, Felipe, cremor and Mohamed Ali
@jnm2 Sure, but a better solution is to have a short timeline for release of s patch.
Why is a better solution to have a shorter timeline on a dependency that many people don't even need? It would be one thing if SQL Server was Azure only, but there are the obvious cases of people hosting on-prem, on AWS and elsewhere - even on an Azure VM.
Reacted by Haukinger, Justin Adler, Stuart Lang and Guillaume Lecomte
@CamiloTerevinto Exactly, so "a short timeline for release of a patch" would solve it for everyone! 😄
During last two months, Azure.Identity has released 5 consecutive version which four of them are deprecated now. Your suggestion indicates we should have had almost 3 patch releases per month.
An automated process could be created to check Azure.Identity latest version for deprecation notice each day and if there is any, hotfix release pipeline could be triggered to release a new version....
Let me discuss this internally with other team members and get back to you.
@JRahnama If you do this, consider that Azure.Identity depends on Microsoft.Identity.Client, so you should really not have an explicit dependcy on Micrsoft.Identity.Client, like you do today:
@JRahnama yeah, it is a lot of updates, but would make all your consumers happy, and potentially avoid/obliviate the requirement to split the package.
@ErikEJ I don't understand this position to be honest. Why do you think that having dependencies that aren't needed for some clients but that are kept up to date somehow better than just not having the dependencies at all?
Even if you updated Azure.Identity and other dependencies quickly for security vulnerabilities, that's only meant for customers that are using Azure SQL - for the rest, you're making them see the release notes for this package to see how the release affects them.
You are also hoping that users will update this package quickly enough with the security vulnerability warning, and I have seen people ignore these on VS even.
@JRahnama If Azure.Identity is your dependency, to me, it doesn't matter how many security hotfix releases they do, it should be a high priority to get this package updated with the dependency patched. Otherwise, you are saying to users of this package that you don't care about their security.
and no, we will not turn off "Warning As Error", we're health care software providers with some of the highest security requirements that exist in the industry.
@dlatikaynen there's no need to turn off "warning as error" - you can simply take a direct reference on a newer version System.Text.Json which doesn't have the CVE. That doesn't mean things shouldn't be updated on the SqlClient/Azure.Identity side, but you shouldn't be blocked by this.
newer version System.Text.Json which doesn't have the CVE
@roji it seems a weird to suggest that every consumer of the SqlClient (i assume there a many at 348.6K downloads per day) apply a hack, instead of making one fix in this codebase and fix it for everyone.
for some context, across out various code bases, we currently have 48 direct reference to various MS packages to avoid CVEs. This is difficult to keep track of since there is no automated way to work out when those CVE hacks are redundant. we need to periodically go back and manually remove them to see if they are still required.
This could be greatly mitigated if MS was pro-active about releasing new nugets that do not have transitive CVEs
@dlatikaynen there's no need to turn off "warning as error" - you can simply take a direct reference on a newer version System.Text.Json which doesn't have the CVE. That doesn't mean things shouldn't be updated on the SqlClient/Azure.Identity side, but you shouldn't be blocked by this.
No sorry taking directly dependencies fundamentally goes against the entire purpose of transitive dependencies being introduced.
I have had to disable warnings as errors for vulnerabilities because I’ve got warnings from dependencies 3-4 levels deep. It’s the dumbest shit ever and frustrating as hell.
Microsoft needs to fix this at nuget level to take latest minor or build versions.
you can simply take a direct reference on a newer version System.Text.Json which doesn't have the CVE
A better solution is to use central package management with transitive pinning and only add a <PackageVersion> element for the updated transitive dependency. That way it stays a transitive dependency instead of becoming a direct one.
But even if you do it that way you still have to manually check it all the time in the future because the tooling doesn't support that very well. See NuGet/Home#13646
I have had to disable warnings as errors for vulnerabilities because I’ve got warnings from dependencies 3-4 levels deep. It’s the dumbest shit ever and frustrating as hell.
Thanks.
I’ll give it a go in the morning. I tried disabling for the advisory url but it didn’t work because the projects and SDK is .NET 8 but I have .NET 9 installed. It worked when I changed to NET 9 but I can’t roll out a NET 9 app yet. Just finishing off Framework 4.7.# to NET 8 and have to move to centralised package versioning to fix dependency mismatch on a 300 project solution.
it seems a weird to suggest that every consumer of the SqlClient (i assume there a many at 348.6K downloads per day) apply a hack, instead of making one fix in this codebase and fix it for everyone.
First, I never said SqlClient shouldn't themselves update to a newer version that doesn't have a CVE - I believe they should. My answer was to @dlatikaynen's comment just above, that he'd consider turning off warnings-as-errors because of this: that's really unnecessary when one can simply make the problem go away by taking a direct dependency instead. The problem is that many users somehow miss the fact that they can take direct dependencies, and think that they're stuck until SqlClient (or whatever intermediate library) updates.
It's also important to make clear that there's no "hack" being suggested here: taking a direct dependency on a transitive dependency achieves exactly the same thing as SqlClient doing the update on their side. It's not ideal to have everyone do that, but it's a very reasonable workaround in the meantime.
The problem is that many users somehow miss the fact that they can take direct dependencies, and think that they're stuck until SqlClient (or whatever intermediate library) updates.
This is a hacky work-around. There is literally no point in Microsoft implementing transitive dependencies if we are required to take direct dependencies to fix CVE issues.
Microsoft is 100% at fault here for wasting time implementing features to ignore advisory urls, disable errors, etc, instead of having a default or a setting to automatically take the latest major/minor/build version of a transitive dependency instead of taking the lowest 100% of the time.
@phillip-haydon not every library will be able to bump a dependency and release at the exact moment that one of its dependencies has a CVE published against it - every time that happens. It's fine to ask SqlClient to update (and they should), but it's also completely fine (and not at all a hack) for an application to temporarily reference a transitive dependency with a CVE.
instead of having a default or a setting to automatically take the latest major/minor/build version of a transitive dependency instead of taking the lowest 100% of the time.
You're basically talking about floating a dependency version, and that is a really bad idea for quite a few reasons.
@roji could you expand on why it should be easier for the consumer of a library to validate the library with a new version of a dependency of the library than it would be for the auther of the library?
What prevents a library author from bumping the dependency, if it is not validation of the new version? Even a one man team should be able to run the test suites and publish a new version withing hours, let alone a corporation the size of microsoft.
It's also important to make clear that there's no "hack" being suggested here: taking a direct dependency on a transitive dependency achieves exactly the same thing as SqlClient doing the update on their side. It's not ideal to have everyone do that, but it's a very reasonable workaround in the meantime.
Without validating the library with the new version of the dependency, this is the textbook definition of hack. Essentially, you're suggesting to potentially thousands of customers to take the direct dependency (completely fine) and gamble that that their applications don't crash because of the library being incompatible with the direct dependency (questionable at least).
What prevents a library author from bumping the dependency, if it is not validation of the new version? Even a one man team should be able to run the test suites and publish a new version withing hours, let alone a corporation the size of microsoft.
That is absolutely not how things work, especially not in a large corporation. Releasing .NET, for example, is a long process with lots of process and verification - it simply isn't possible to "just release" within a few hours.
Without validating the library with the new version of the dependency, this is the textbook definition of hack.
It is not.
SqlClient is does not specify a single, specific version of its own dependencies; it could do that via nuget, saying that it will only work with a specific version, but instead it does the default thing of requiring only a minimum version. It is common and accepted for people to bump patch (but not major) versions of a transitive dependency, because e.g. a bug is fixed in that transitive dependency and a newer version of the direct dependency hasn't been released (remember, this isn't just about security). For example, with EF, it's fine for people to depend on a newer version of SqlClient than is specified by EF's SQL Server provider; the compatibility bar is generally very high.
And regardless, ultimate validation that everything works is your responsibility as the app developer. Even if SqlClient was tested to be compatible with a certain version of its own transitive dependency, upgrading to that transitive dependency may cause issues in your own application in various ways.
Stepping back... Everyone, this isn't the place to debate general .NET practices around transitive dependencies and CVEs. Nobody is saying that SqlClient shouldn't update its dependencies to avoid having CVEs in its transitive dependency graph; but this simply isn't something that can always happen immediately.
You certainly have the right to expect SqlClient (and any other maintained library) to bump its own dependency versions and release, so that there are no transitive CVEs. But you cannot expect that to happen 5 minutes after a CVE is published.
Activity
dauinsight commentedon Jun 13, 2024
We'll look to have this scheduled for our next release
SimonCropp commentedon Jun 14, 2024
this is a poor experience for consumers. for anyone who has CVE scanning turned on it breaks builds. and they need to explicitly add an azure reference to work around it. so for us it means doing a temporary hack on approx 40 projects just to build again. note that we dont even use azure.
if the sqlclient wants force a transitive azure ref on non azure users, then you should pro-actively release cve related fixes for azure.
PureKrome commentedon Jun 14, 2024
or a version (stripped down?) without this nuget and whatever it offers? or how about the default version doesn't have this at all and a 2nd version has this so people who want to use Azure.Identity with their SqlClient can use that version. For the 99% rest of us, we don't need to worry about this transitive dep anymore/then.
jnm2 commentedon Jun 14, 2024
One reason of many to want #1108.
ErikEJ commentedon Jun 14, 2024
@jnm2 Sure, but a better solution is to have a short timeline for release of s patch.
jnm2 commentedon Jun 14, 2024
For this individual occurrence, yes, but I'm also thinking of the future ones.
CamiloTerevinto commentedon Jun 15, 2024
Why is a better solution to have a shorter timeline on a dependency that many people don't even need? It would be one thing if SQL Server was Azure only, but there are the obvious cases of people hosting on-prem, on AWS and elsewhere - even on an Azure VM.
ErikEJ commentedon Jun 15, 2024
@CamiloTerevinto if you are on premises I guess the vulnerability would not affect you, but Azure users would want a patch as soon as possible?
CamiloTerevinto commentedon Jun 15, 2024
@ErikEJ it affects everyone that treats package vulnerability warnings as errors and those that use SCA as well.
ErikEJ commentedon Jun 15, 2024
@CamiloTerevinto Exactly, so "a short timeline for release of a patch" would solve it for everyone! 😄
JRahnama commentedon Jun 16, 2024
During last two months, Azure.Identity has released 5 consecutive version which four of them are deprecated now. Your suggestion indicates we should have had almost 3 patch releases per month.
An automated process could be created to check Azure.Identity latest version for deprecation notice each day and if there is any, hotfix release pipeline could be triggered to release a new version....
Let me discuss this internally with other team members and get back to you.
ErikEJ commentedon Jun 16, 2024
@JRahnama yeah, it is a lot of updates, but would make all your consumers happy, and potentially avoid/obliviate the requirement to split the package.
ErikEJ commentedon Jun 16, 2024
@JRahnama If you do this, consider that Azure.Identity depends on Microsoft.Identity.Client, so you should really not have an explicit dependcy on Micrsoft.Identity.Client, like you do today:
https://www.nuget.org/packages/Azure.Identity#dependencies-body-tab
CamiloTerevinto commentedon Jun 16, 2024
@ErikEJ I don't understand this position to be honest. Why do you think that having dependencies that aren't needed for some clients but that are kept up to date somehow better than just not having the dependencies at all?
Even if you updated Azure.Identity and other dependencies quickly for security vulnerabilities, that's only meant for customers that are using Azure SQL - for the rest, you're making them see the release notes for this package to see how the release affects them.
You are also hoping that users will update this package quickly enough with the security vulnerability warning, and I have seen people ignore these on VS even.
@JRahnama If Azure.Identity is your dependency, to me, it doesn't matter how many security hotfix releases they do, it should be a high priority to get this package updated with the dependency patched. Otherwise, you are saying to users of this package that you don't care about their security.
19 remaining items
dlatikaynen commentedon Nov 19, 2024
5.2.2 contains System.Text.Json 8.0.0 which gives:
NU1903: Warning As Error: Package 'System.Text.Json' 8.0.0 has a known high severity vulnerability, GHSA-8g4q-xg66-9fp4
so, the dependency tree of 5.2.2 still causes any solution/project which references it to fail the build in azure devops pipelines.
and no, we will not turn off "Warning As Error", we're health care software providers with some of the highest security requirements that exist in the industry.
roji commentedon Nov 19, 2024
@dlatikaynen there's no need to turn off "warning as error" - you can simply take a direct reference on a newer version System.Text.Json which doesn't have the CVE. That doesn't mean things shouldn't be updated on the SqlClient/Azure.Identity side, but you shouldn't be blocked by this.
SimonCropp commentedon Nov 19, 2024
@roji it seems a weird to suggest that every consumer of the SqlClient (i assume there a many at 348.6K downloads per day) apply a hack, instead of making one fix in this codebase and fix it for everyone.
for some context, across out various code bases, we currently have 48 direct reference to various MS packages to avoid CVEs. This is difficult to keep track of since there is no automated way to work out when those CVE hacks are redundant. we need to periodically go back and manually remove them to see if they are still required.
This could be greatly mitigated if MS was pro-active about releasing new nugets that do not have transitive CVEs
phillip-haydon commentedon Nov 20, 2024
No sorry taking directly dependencies fundamentally goes against the entire purpose of transitive dependencies being introduced.
I have had to disable warnings as errors for vulnerabilities because I’ve got warnings from dependencies 3-4 levels deep. It’s the dumbest shit ever and frustrating as hell.
Microsoft needs to fix this at nuget level to take latest minor or build versions.
MichelZ commentedon Nov 20, 2024
https://blogs.microsoft.com/blog/2024/05/03/prioritizing-security-above-all-else/
phillip-haydon commentedon Nov 20, 2024
This is funny. So instead of doing security. Microsoft decided to add work arounds to prevent doing security.
cremor commentedon Nov 20, 2024
A better solution is to use central package management with transitive pinning and only add a
<PackageVersion>element for the updated transitive dependency. That way it stays a transitive dependency instead of becoming a direct one.But even if you do it that way you still have to manually check it all the time in the future because the tooling doesn't support that very well. See NuGet/Home#13646
I agree that Microsoft should release updated package versions for all their packages when a dependency is updated because of a security problem.
But if you want to ignore those warnings for now - which seems to be the case since you disabled warnings as errors - you can set
<NuGetAuditMode>direct</NuGetAuditMode>to ignore security warnings from transitive dependencies. Documentation: https://learn.microsoft.com/en-us/nuget/concepts/auditing-packages#configuring-nuget-auditphillip-haydon commentedon Nov 20, 2024
Thanks.
I’ll give it a go in the morning. I tried disabling for the advisory url but it didn’t work because the projects and SDK is .NET 8 but I have .NET 9 installed. It worked when I changed to NET 9 but I can’t roll out a NET 9 app yet. Just finishing off Framework 4.7.# to NET 8 and have to move to centralised package versioning to fix dependency mismatch on a 300 project solution.
roji commentedon Nov 20, 2024
@SimonCropp
First, I never said SqlClient shouldn't themselves update to a newer version that doesn't have a CVE - I believe they should. My answer was to @dlatikaynen's comment just above, that he'd consider turning off warnings-as-errors because of this: that's really unnecessary when one can simply make the problem go away by taking a direct dependency instead. The problem is that many users somehow miss the fact that they can take direct dependencies, and think that they're stuck until SqlClient (or whatever intermediate library) updates.
It's also important to make clear that there's no "hack" being suggested here: taking a direct dependency on a transitive dependency achieves exactly the same thing as SqlClient doing the update on their side. It's not ideal to have everyone do that, but it's a very reasonable workaround in the meantime.
phillip-haydon commentedon Nov 20, 2024
This is a hacky work-around. There is literally no point in Microsoft implementing transitive dependencies if we are required to take direct dependencies to fix CVE issues.
Microsoft is 100% at fault here for wasting time implementing features to ignore advisory urls, disable errors, etc, instead of having a default or a setting to automatically take the latest major/minor/build version of a transitive dependency instead of taking the lowest 100% of the time.
roji commentedon Nov 20, 2024
@phillip-haydon not every library will be able to bump a dependency and release at the exact moment that one of its dependencies has a CVE published against it - every time that happens. It's fine to ask SqlClient to update (and they should), but it's also completely fine (and not at all a hack) for an application to temporarily reference a transitive dependency with a CVE.
You're basically talking about floating a dependency version, and that is a really bad idea for quite a few reasons.
Haukinger commentedon Nov 21, 2024
@roji could you expand on why it should be easier for the consumer of a library to validate the library with a new version of a dependency of the library than it would be for the auther of the library?
What prevents a library author from bumping the dependency, if it is not validation of the new version? Even a one man team should be able to run the test suites and publish a new version withing hours, let alone a corporation the size of microsoft.
Without validating the library with the new version of the dependency, this is the textbook definition of hack. Essentially, you're suggesting to potentially thousands of customers to take the direct dependency (completely fine) and gamble that that their applications don't crash because of the library being incompatible with the direct dependency (questionable at least).
roji commentedon Nov 21, 2024
That is absolutely not how things work, especially not in a large corporation. Releasing .NET, for example, is a long process with lots of process and verification - it simply isn't possible to "just release" within a few hours.
It is not.
SqlClient is does not specify a single, specific version of its own dependencies; it could do that via nuget, saying that it will only work with a specific version, but instead it does the default thing of requiring only a minimum version. It is common and accepted for people to bump patch (but not major) versions of a transitive dependency, because e.g. a bug is fixed in that transitive dependency and a newer version of the direct dependency hasn't been released (remember, this isn't just about security). For example, with EF, it's fine for people to depend on a newer version of SqlClient than is specified by EF's SQL Server provider; the compatibility bar is generally very high.
And regardless, ultimate validation that everything works is your responsibility as the app developer. Even if SqlClient was tested to be compatible with a certain version of its own transitive dependency, upgrading to that transitive dependency may cause issues in your own application in various ways.
Stepping back... Everyone, this isn't the place to debate general .NET practices around transitive dependencies and CVEs. Nobody is saying that SqlClient shouldn't update its dependencies to avoid having CVEs in its transitive dependency graph; but this simply isn't something that can always happen immediately.
You certainly have the right to expect SqlClient (and any other maintained library) to bump its own dependency versions and release, so that there are no transitive CVEs. But you cannot expect that to happen 5 minutes after a CVE is published.