-
Notifications
You must be signed in to change notification settings - Fork 93
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
Update to Newtonsoft 13.0.1 #2504
Conversation
<PackageReference Include="Microsoft.TeamFoundationServer.Client" Version="16.153.0" /> | ||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" /> | ||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> |
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.
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.
Yes, this is needed. Otherwise, TFS will default to an older version of Newtonsoft.
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.
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.
I tried, I think this line is not need, the reason is
Microsoft.Json.Schema 1.1.4 only needs Newtonsoft.Json (>= 9.0.1);
Microsoft.TeamFoundationServer.Client 16.153.0 needs
Newtonsoft.Json (>= 10.0.3);
so the result is 10.0.3;
now this project already using Microsoft.Json.Schema 1.1.5 needs Newtonsoft.Json (>= 13.0.1)
so we will get 13.0.1
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.
Eddy experimented on this one both ways and determined that it is needed at this time.
@@ -47,7 +47,7 @@ | |||
|
|||
<ItemGroup> | |||
<PackageReference Include="FluentAssertions" Version="5.10.2" /> | |||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" /> | |||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0-preview-20220707-01" /> |
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.
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.
This preview version includes the update to Newtonsoft 13.0.1
src/ReleaseHistory.md
Outdated
@@ -4,6 +4,7 @@ | |||
|
|||
* FEATURE: Add `max-file-size-in-kb` argument that allows filtering scan targets by file size. [#2494](https://github.com/microsoft/sarif-sdk/pull/2494) | |||
* BUGFIX: Fix false positive for `SARIF1002.UrisMustBeValid` for file URIs that omit the `authority`. [#2501](https://github.com/microsoft/sarif-sdk/pull/2501) | |||
* DEPENDENCY: Updating [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/13.0.1) to v13.0.1, [Microsoft.Json.Schema](https://www.nuget.org/packages/Microsoft.Json.Schema) to v1.1.5, and [Microsoft.Json.Pointer](https://www.nuget.org/packages/Microsoft.Json.Pointer) to v1.1.5 in response to [Advisory: Improper Handling of Exceptional Conditions in Newtonsoft.Json](https://github.com/advisories/GHSA-5crp-9r3c-p9vr). [#2504](https://github.com/microsoft/sarif-sdk/pull/2504) |
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.
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.
We didn't follow this convention when we updated to v12.0.1. In fact, I don't see a release history note for that specific update. In this case, the release history serves to tell anyone using the SARIF sdk that this version resolves the Newtonsoft vulnerability. I did consider this approach. If during testing, we see any indicators that this is indeed a breaking change, then we can re-evaluate the note.
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.
I need to correct my previous statement. I was able to find the latest release history note and confirmed that this pattern has been repeated and took the suggestion. Thank you.
@@ -28,10 +28,11 @@ | |||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.2" /> | |||
<PackageReference Include="Microsoft.Extensions.Logging.ApplicationInsights" Version="2.13.1" /> | |||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="3.1.2" /> | |||
<PackageReference Include="Microsoft.Json.Schema" Version="1.1.4" /> | |||
<PackageReference Include="Microsoft.Json.Schema.Validation" Version="1.1.4" /> |
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.
I created a local enlistment of this branch, and run BuildAndTest.cmd and ran BuildAndTest.cmd. In reply to: 1188373442 |
don't see where the reference to 10.0.3 comes from, but i got this build error after block the access to 10.0.3
In reply to: 1188373442 |
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.
I see the 10.0.3 dependency in these packages: We use Microsoft.Extensions.Logging.ApplicationInsights, where all versions are marked deprecated except the latest. This is where the ref to microsoft.applicationinsights.windowsserver.telemetrychannel comes from I believe. In reply to: 1188488582 |
Just wanted to note that as of the updates to the above packages, the scan from the build pipeline is passing. In reply to: 1189381557 |
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.
src/build.props
Outdated
@@ -10,8 +10,8 @@ | |||
<Company Condition=" '$(Company)' == '' ">Microsoft</Company> | |||
<Product Condition=" '$(Product)' == '' ">Microsoft SARIF SDK</Product> | |||
<Copyright Condition=" '$(Copyright)' == '' ">© Microsoft Corporation. All rights reserved.</Copyright> | |||
<VersionPrefix>2.4.15</VersionPrefix> | |||
<PreviousVersionPrefix>2.4.14</PreviousVersionPrefix> | |||
<VersionPrefix>2.4.16</VersionPrefix> |
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.
src/ReleaseHistory.md
Outdated
@@ -4,6 +4,7 @@ | |||
|
|||
* FEATURE: Add `max-file-size-in-kb` argument that allows filtering scan targets by file size. [#2494](https://github.com/microsoft/sarif-sdk/pull/2494) | |||
* BUGFIX: Fix false positive for `SARIF1002.UrisMustBeValid` for file URIs that omit the `authority`. [#2501](https://github.com/microsoft/sarif-sdk/pull/2501) | |||
* DEPENDENCY BREAKING: SARIF now requires Newtonsoft.JSON 13.0.1. Updating [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/13.0.1) to v13.0.1, [Microsoft.Json.Schema](https://www.nuget.org/packages/Microsoft.Json.Schema) to v1.1.5, and [Microsoft.Json.Pointer](https://www.nuget.org/packages/Microsoft.Json.Pointer) to v1.1.5 in response to [Advisory: Improper Handling of Exceptional Conditions in Newtonsoft.Json](https://github.com/advisories/GHSA-5crp-9r3c-p9vr). [#2504](https://github.com/microsoft/sarif-sdk/pull/2504) |
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.
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.
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.
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.
Bumps Newtonsoft.Json from 10.0.3 and 12.0.3 to 13.0.1. Additionally, this updates JSchema to v1.1.5 and Microsoft.NET.Test.Sdk to 17.4.0-preview-20220707-01 (both of which are implementing updates to Newtonsoft.Json).
Address Advisory: Improper Handling of Exceptional Conditions in Newtonsoft.Json for direct Newtonsoft.Json dependencies.
Supercedes: #2489. #2490, #2491, #2492, #2493, #2494, #2495, #2496, #2497, and #2499.
Release notes
Sourced from Newtonsoft.Json's releases.
... (truncated)