Skip to content

Commit

Permalink
Fixed security vulnerability in System.Linq.Dynamic.Core
Browse files Browse the repository at this point in the history
  • Loading branch information
jezzsantos committed Feb 4, 2025
1 parent 7687b79 commit d8a7fdf
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
11 changes: 11 additions & 0 deletions README_DERIVATIVE.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,17 @@ Only run these kinds of tests when the code in the technology adapters changes.
`dotnet test --filter:"Category=Integration.External" src\SaaStack.sln` (requires internet access to external services)

# Upgrading .NET Version

If you need to upgrade the version of .NET for this codebase, do the following:
1. Download the new version of the .NET SDK from this page: https://dotnet.microsoft.com/en-us/download/dotnet
2. Run the installer for your OS. This will add a new version to your local machine, but it will not change anything.
3. Make a note of the version of the runtime, and the SDK (they are different numbers)
4. In `Directory.Build.props`, change the value of the `<RoslynTargetFramework>` variable to the version of the runtime.
5. In `RuntimeConstants.cs` change the value of both `DotNet.RuntimeVersion`, `Dotnet.SdkVersion` and `DotNet.Version`.
6. (Optional) If necessary (i.e. moving from .NET 8 to .NET 9) then find and replace the `<TargetFramework>net8.0</TargetFramework>` attribute in every `*.csproj` file in the solution.
7. Rebuild the solution

# Versioning the Code

> Note: We use the 2 dot [Semantic Versioning](https://semver.org/spec/v2.0.0.html) scheme.
Expand Down
4 changes: 3 additions & 1 deletion src/Application.Interfaces/Application.Interfaces.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.5" />
<!-- We need to pin this specific version of System.Linq.Dynamic.Core to 1.5.1, since newer versions break our use of the library -->
<!-- we need to suppress the build warnings, since this version contains security vulnerabilities that we do accept -->
<PackageReference Include="System.Linq.Dynamic.Core" Version="[1.5.1]" NoWarn="NU1903" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn),1573,1574,1591,1712,1723,SAASDDD037</NoWarn>
<RoslynTargetFramework>8.0.6</RoslynTargetFramework> <!-- Must match the RuntimeConstants.Dotnet versions -->
<RoslynTargetFramework>8.0.6</RoslynTargetFramework> <!-- Update the RuntimeConstants.Dotnet versions also -->
</PropertyGroup>

<!-- Runs the analyzers (in memory) on build -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
<ItemGroup>
<ProjectReference Include="..\Application.Persistence.Common\Application.Persistence.Common.csproj" />
<ProjectReference Include="..\Infrastructure.Persistence.Interfaces\Infrastructure.Persistence.Interfaces.csproj" />
<ProjectReference Include="..\Application.Interfaces\Application.Interfaces.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Polly" Version="7.2.4" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.6" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit d8a7fdf

Please sign in to comment.