Skip to content
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

Pin transitive dependencies to mitigate CVEs #284

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## v1.5.1 (Unreleased)

### Updates

* Updated repo to use central package management
* Resolved multiple CVEs in dependencies

## v1.5.0

### Updates
Expand Down
Binary file modified Directory.Packages.props
Binary file not shown.
1 change: 1 addition & 0 deletions DurableTask.SqlServer.sln
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
CHANGELOG.md = CHANGELOG.md
src\common.props = src\common.props
Directory.Build.targets = Directory.Build.targets
Directory.Packages.props = Directory.Packages.props
nuget.config = nuget.config
README.md = README.md
sign.snk = sign.snk
Expand Down
10 changes: 9 additions & 1 deletion src/DurableTask.SqlServer/DurableTask.SqlServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@
<PackageReference Include="Microsoft.Azure.DurableTask.Core" />
<PackageReference Include="Microsoft.Data.SqlClient" />
<PackageReference Include="SemanticVersion" />
<PackageReference Include="System.Threading.Channels" />
</ItemGroup>

<!-- Transitive dependency pinning -->
<ItemGroup>
<PackageReference Include="Azure.Core" />
<PackageReference Include="Azure.Identity" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" />
<PackageReference Include="System.Text.Json" />
</ItemGroup>

</Project>
29 changes: 0 additions & 29 deletions src/DurableTask.SqlServer/Utils/AsyncQueue.cs

This file was deleted.

2 changes: 1 addition & 1 deletion src/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<PropertyGroup>
<MajorVersion>1</MajorVersion>
<MinorVersion>5</MinorVersion>
<PatchVersion>0</PatchVersion>
<PatchVersion>1</PatchVersion>
<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
<VersionSuffix></VersionSuffix>
<AssemblyVersion>$(MajorVersion).$(MinorVersion).0.0</AssemblyVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,12 @@ class TestFunctionTypeLocator : ITypeLocator

class TestSettingsResolver : INameResolver, IConnectionInfoResolver
{
readonly Dictionary<string, string> testSettings;
readonly Dictionary<string, string?> testSettings;
IConfigurationRoot? config;

public TestSettingsResolver()
{
this.testSettings = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
this.testSettings = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase);
}

public void AddSetting(string name, string value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace DurableTask.SqlServer.AzureFunctions.Tests
{
using System.Threading.Tasks;
using DurableTask.Core;
using Microsoft.Azure.WebJobs.Extensions.DurableTask;
using Microsoft.Azure.WebJobs.Host.Scale;
Expand All @@ -21,14 +22,14 @@ public TargetBasedScalingTests()
SqlOrchestrationService? nullServiceArg = null; // not needed for this test
this.metricsProviderMock = new Mock<SqlMetricsProvider>(
behavior: MockBehavior.Strict,
nullServiceArg);
nullServiceArg!);
}

[Theory]
[InlineData(0)]
[InlineData(10)]
[InlineData(20)]
public async void TargetBasedScalingTest(int expectedTargetWorkerCount)
public async Task TargetBasedScalingTest(int expectedTargetWorkerCount)
{
var durabilityProviderMock = new Mock<DurabilityProvider>(
MockBehavior.Strict,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ async Task ValidateDatabaseSchemaAsync(TestDatabase database, string schemaName
schemaName);
Assert.Equal(1, currentSchemaVersion.Major);
Assert.Equal(5, currentSchemaVersion.Minor);
Assert.Equal(0, currentSchemaVersion.Patch);
Assert.Equal(1, currentSchemaVersion.Patch);
}

sealed class TestDatabase : IDisposable
Expand Down
7 changes: 7 additions & 0 deletions tools/TestDBGenerator/TestDBGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,11 @@
<PackageReference Include="Microsoft.SqlServer.SqlManagementObjects" />
</ItemGroup>

<!-- Transitive dependency pinning -->
<ItemGroup>
<PackageReference Include="Azure.Identity" />
<PackageReference Include="Azure.Core" />
<PackageReference Include="System.Text.Json" />
</ItemGroup>

</Project>
Loading