Skip to content

Release a new version with an update ref to 'Azure.Identity' #2568

Closed

Description

@SimonCropp

'Azure.Identity' 1.11.3 has a known moderate severity vulnerability, GHSA-m5vv-6r4h-3vj9

can you release a version that updates this reference

Activity

  1. dauinsight commented on Jun 13, 2024

    @dauinsight
    Contributor

    We'll look to have this scheduled for our next release

  2. SimonCropp commented on Jun 14, 2024

    @SimonCropp
    ContributorAuthor

    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.

  3. PureKrome commented on Jun 14, 2024

    @PureKrome

    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.

  4. jnm2 commented on Jun 14, 2024

    @jnm2

    One reason of many to want #1108.

  5. ErikEJ commented on Jun 14, 2024

    @ErikEJ
    Contributor

    @jnm2 Sure, but a better solution is to have a short timeline for release of s patch.

  6. jnm2 commented on Jun 14, 2024

    @jnm2

    For this individual occurrence, yes, but I'm also thinking of the future ones.

  7. CamiloTerevinto commented on Jun 15, 2024

    @CamiloTerevinto

    @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.

  8. ErikEJ commented on Jun 15, 2024

    @ErikEJ
    Contributor

    @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?

  9. CamiloTerevinto commented on Jun 15, 2024

    @CamiloTerevinto

    @ErikEJ it affects everyone that treats package vulnerability warnings as errors and those that use SCA as well.

  10. ErikEJ commented on Jun 15, 2024

    @ErikEJ
    Contributor

    @CamiloTerevinto Exactly, so "a short timeline for release of a patch" would solve it for everyone! 😄

  11. JRahnama commented on Jun 16, 2024

    @JRahnama
    Contributor

    @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.

  12. ErikEJ commented on Jun 16, 2024

    @ErikEJ
    Contributor

    @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.

  13. ErikEJ commented on Jun 16, 2024

    @ErikEJ
    Contributor

    @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

        <AzureIdentityVersion>1.11.3</AzureIdentityVersion>
        <MicrosoftIdentityClientVersion>4.60.3</MicrosoftIdentityClientVersion>
  14. CamiloTerevinto commented on Jun 16, 2024

    @CamiloTerevinto

    @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.

  15. 19 remaining items

  16. dlatikaynen commented on Nov 19, 2024

    @dlatikaynen

    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.

            ├─ Microsoft.Data.SqlClient (v5.2.2)
            │  └─ Azure.Identity (v1.11.4)
            │     ├─ Azure.Core (v1.38.0)
            │     │  ├─ System.ClientModel (v1.0.0)
            │     │  │  ├─ System.Memory.Data (v1.0.2)
            │     │  │  │  └─ System.Text.Json (v8.0.0)
            │     │  │  └─ System.Text.Json (v8.0.0)
            │     │  ├─ System.Memory.Data (v1.0.2)
            │     │  │  └─ System.Text.Json (v8.0.0)
            │     │  └─ System.Text.Json (v8.0.0)
            │     └─ System.Text.Json (v8.0.0)
    

    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.

  17. roji commented on Nov 19, 2024

    @roji
    Member

    @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.

  18. SimonCropp commented on Nov 19, 2024

    @SimonCropp
    ContributorAuthor

    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

  19. phillip-haydon commented on Nov 20, 2024

    @phillip-haydon
    Contributor

    @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.

  20. MichelZ commented on Nov 20, 2024

    @MichelZ
    Contributor

    https://blogs.microsoft.com/blog/2024/05/03/prioritizing-security-above-all-else/

    If you’re faced with the tradeoff between security and another priority, your answer is clear: Do security. -- Satya Nadella
    
  21. phillip-haydon commented on Nov 20, 2024

    @phillip-haydon
    Contributor

    https://blogs.microsoft.com/blog/2024/05/03/prioritizing-security-above-all-else/

    If you’re faced with the tradeoff between security and another priority, your answer is clear: Do security. -- Satya Nadella
    

    This is funny. So instead of doing security. Microsoft decided to add work arounds to prevent doing security.

  22. cremor commented on Nov 20, 2024

    @cremor

    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.

    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-audit

  23. phillip-haydon commented on Nov 20, 2024

    @phillip-haydon
    Contributor

    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-audit

    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.

  24. roji commented on Nov 20, 2024

    @roji
    Member

    @SimonCropp

    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.

  25. phillip-haydon commented on Nov 20, 2024

    @phillip-haydon
    Contributor

    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.

  26. roji commented on Nov 20, 2024

    @roji
    Member

    @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.

  27. Haukinger commented on Nov 21, 2024

    @Haukinger

    @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).

  28. roji commented on Nov 21, 2024

    @roji
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions