Skip to content

Commit 7acde2e

Browse files
authored
Updates for NuGet vulnerability auditing (#142)
* Add NuGet audit settings * Add NuGet audit workflow * Clean up project files * Update SDK version used by repo
1 parent 0a44a25 commit 7acde2e

File tree

13 files changed

+54
-23
lines changed

13 files changed

+54
-23
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Setup .NET SDK
2525
uses: actions/[email protected]
2626
with:
27-
dotnet-version: 8.0.x
27+
global-json-file: global.json
2828
- name: Build
2929
run: dotnet build src --configuration Release -graph
3030
- name: Set up Node.js

.github/workflows/nuget-audit.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: NuGet Audit
2+
on:
3+
workflow_dispatch:
4+
env:
5+
DOTNET_NOLOGO: true
6+
jobs:
7+
call-shared-nuget-audit:
8+
uses: particular/shared-workflows/.github/workflows/nuget-audit.yml@main
9+
secrets: inherit

global.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"sdk": {
3+
"version": "9.0.100",
4+
"rollForward": "latestFeature"
5+
}
6+
}

src/Billing/Billing.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@
1616
<ItemGroup>
1717
<FrameworkReference Include="Microsoft.AspNetCore.App" />
1818
</ItemGroup>
19-
19+
2020
<ItemGroup>
21+
<PackageReference Include="MassTransit.AmazonSQS" Version="8.3.6" />
2122
<PackageReference Include="MassTransit.Azure.ServiceBus.Core" Version="8.3.6" />
2223
<PackageReference Include="MassTransit.RabbitMQ" Version="8.3.6" />
23-
<PackageReference Include="MassTransit.AmazonSQS" Version="8.3.6" />
2424
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
2525
</ItemGroup>
26+
2627
</Project>

src/Billing/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
1+
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
22
ARG BUILD_CONFIGURATION=Release
33
ARG TARGETARCH
44
WORKDIR /src

src/ClientUI/ClientUI.csproj

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,19 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="MassTransit.Azure.ServiceBus.Core" Version="8.3.6" />
13-
<PackageReference Include="MassTransit.RabbitMQ" Version="8.3.6" />
14-
<PackageReference Include="MassTransit.AmazonSQS" Version="8.3.6" />
15-
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
12+
<ProjectReference Include="..\Helper\Helper.csproj" />
13+
<ProjectReference Include="..\Messages\Messages.csproj" />
1614
</ItemGroup>
17-
15+
1816
<ItemGroup>
1917
<FrameworkReference Include="Microsoft.AspNetCore.App" />
2018
</ItemGroup>
21-
19+
2220
<ItemGroup>
23-
<ProjectReference Include="..\Messages\Messages.csproj" />
24-
<ProjectReference Include="..\Helper\Helper.csproj" />
21+
<PackageReference Include="MassTransit.AmazonSQS" Version="8.3.6" />
22+
<PackageReference Include="MassTransit.Azure.ServiceBus.Core" Version="8.3.6" />
23+
<PackageReference Include="MassTransit.RabbitMQ" Version="8.3.6" />
24+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
2525
</ItemGroup>
26+
2627
</Project>

src/ClientUI/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
1+
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
22
ARG BUILD_CONFIGURATION=Release
33
ARG TARGETARCH
44
WORKDIR /src

src/Directory.Build.props

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<TreatWarningsAsErrors Condition="'$(Configuration)' != 'Debug'">true</TreatWarningsAsErrors>
5+
<NuGetAuditLevel>low</NuGetAuditLevel>
6+
<NuGetAuditMode>all</NuGetAuditMode>
7+
</PropertyGroup>
8+
9+
<PropertyGroup Condition="'$(CI)' != ''">
10+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
11+
</PropertyGroup>
12+
13+
</Project>

src/Helper/Helper.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
<ItemGroup>
99
<PackageReference Include="dotenv.net" Version="3.2.1" />
10+
<PackageReference Include="MassTransit.AmazonSQS" Version="8.3.6" />
1011
<PackageReference Include="MassTransit.Azure.ServiceBus.Core" Version="8.3.6" />
1112
<PackageReference Include="MassTransit.RabbitMQ" Version="8.3.6" />
12-
<PackageReference Include="MassTransit.AmazonSQS" Version="8.3.6" />
1313
</ItemGroup>
1414

1515
</Project>

src/Sales/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
1+
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
22
ARG BUILD_CONFIGURATION=Release
33
ARG TARGETARCH
44
WORKDIR /src

0 commit comments

Comments
 (0)