Restructured .net solutions

Resolved volnerability
This commit is contained in:
2026-10-21 10:41:23 +02:00
parent 95a86e1a87
commit 270929948d
9 changed files with 357 additions and 380 deletions
+6 -2
View File
@@ -8,7 +8,11 @@ EXPOSE 8080
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
# Copy csproj files for layer caching
# Copy props and csproj files for layer caching
COPY ["Directory.Build.props", "./"]
COPY ["Directory.Packages.props", "./"]
COPY ["PostFundManagement.snk", "./"]
COPY ["LICENSE", "./"]
COPY ["PostFundManagement.Api/PostFundManagement.Api.csproj", "PostFundManagement.Api/"]
COPY ["PostFundManagement.Application/PostFundManagement.Application.csproj", "PostFundManagement.Application/"]
COPY ["PostFundManagement.Domain/PostFundManagement.Domain.csproj", "PostFundManagement.Domain/"]
@@ -33,4 +37,4 @@ RUN dotnet publish "PostFundManagement.Api.csproj" -c Release -o /app/publish /p
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "PostFundManagement.Api.dll"]
ENTRYPOINT ["dotnet", "PostFundManagement.Api.dll"]
@@ -1,111 +1,63 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>59a05094-4ac2-472d-af04-3407e909432d</UserSecretsId>
<AssemblyOriginatorKeyFile>..\PostFundManagement.snk</AssemblyOriginatorKeyFile>
<SignAssembly>True</SignAssembly>
<PackageLicenseFile>..\LICENSE</PackageLicenseFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<NoWarn>1701;1702;AV0029;AV0030;</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<NoWarn>1701;1702;AV0029;AV0030;</NoWarn>
</PropertyGroup>
<!-- Security (IODC)-->
<!-- Security (OIDC) -->
<ItemGroup>
<PackageReference Include="IdentityModel.AspNetCore" Version="4.3.0" />
<PackageReference Include="IdentityModel.AspNetCore.OAuth2introspection" Version="6.2.0" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />
<PackageReference Include="IdentityModel" Version="6.2.0" />
<PackageReference Include="KubernetesClient" Version="19.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Certificate" Version="10.0.12" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.12" />
<Using Include="Microsoft.FeatureManagement" />
<Using Include="Microsoft.AspNetCore.Authentication" />
<Using Include="Microsoft.AspNetCore.Authentication.Cookies" />
<Using Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" />
<Using Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
<Using Include="Microsoft.IdentityModel.Tokens" />
<Using Include="System.Security.Claims" />
<PackageReference Include="IdentityModel.AspNetCore" />
<PackageReference Include="IdentityModel.AspNetCore.OAuth2introspection" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" />
<PackageReference Include="IdentityModel" />
<PackageReference Include="KubernetesClient" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Certificate" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
</ItemGroup>
<!-- Health Checks -->
<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.UI" Version="9.0.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="9.0.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="9.0.0" />
<PackageReference Include="AspNetCore.HealthChecks.NpgSql" Version="9.0.0" />
<Using Include="Microsoft.Extensions.Diagnostics.HealthChecks" />
<Using Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" />
<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.UI" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" />
<PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" />
<PackageReference Include="AspNetCore.HealthChecks.NpgSql" />
</ItemGroup>
<!-- API Versioning -->
<ItemGroup>
<PackageReference Include="AccessTokenClient.Extensions" Version="5.1.0" />
<PackageReference Include="Asp.Versioning.Abstractions" Version="10.2.1" />
<PackageReference Include="Asp.Versioning.Http" Version="10.2.3" />
<PackageReference Include="Asp.Versioning.Mvc.ApiExplorer" Version="10.2.1" />
<Using Include="Asp.Versioning" />
<Using Include="Asp.Versioning.Builder" />
<PackageReference Include="AccessTokenClient.Extensions" />
<PackageReference Include="Asp.Versioning.Abstractions" />
<PackageReference Include="Asp.Versioning.Http" />
<PackageReference Include="Asp.Versioning.Mvc.ApiExplorer" />
</ItemGroup>
<!-- API Documentation -->
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.12" />
<PackageReference Include="Scalar.AspNetCore" Version="2.17.4" />
<Using Include="Scalar.AspNetCore" />
<Using Include="Microsoft.OpenApi" />
<Using Include="Microsoft.AspNetCore.OpenApi" />
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" />
<PackageReference Include="Scalar.AspNetCore" />
</ItemGroup>
<!-- file nesting -->
<!-- File Nesting -->
<ItemGroup>
<ProjectCapability Include="ConfigurableFileNesting" />
<ProjectCapability Include="ConfigurableFileNestingFeatureEnabled" />
</ItemGroup>
<!-- CQRS -->
<!-- CQRS Source Generator -->
<ItemGroup>
<PackageReference Include="Mediator.SourceGenerator" Version="3.0.2">
<PackageReference Include="Mediator.SourceGenerator">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<Using Include="FluentResults" />
<Using Include="Mediator" />
<Using Include="Quartz" />
</ItemGroup>
<!-- Shared Static Usings -->
<ItemGroup>
<Using Static="true" Include="PostFundManagement.Application.Extensions.General" />
<Using Alias="Problems" Include="Microsoft.AspNetCore.Mvc.ProblemDetails" />
</ItemGroup>
<!-- Shared Global Usings -->
<!-- Project-specific Usings -->
<ItemGroup>
<Using Include="System.Web" />
<Using Include="PostFundManagement.Domain.Attributes" />
<Using Include="System.Diagnostics" />
<Using Include="System.Reflection" />
<Using Alias="Problems" Include="Microsoft.AspNetCore.Mvc.ProblemDetails" />
<Using Include="Asp.Versioning.Builder" />
<Using Include="Microsoft.AspNetCore.Mvc" />
<Using Include="Microsoft.EntityFrameworkCore" />
<Using Include="System.ComponentModel.DataAnnotations" />
<Using Include="Microsoft.Extensions.DependencyInjection.Extensions" />
<Using Include="System.Security.Cryptography.X509Certificates" />
<Using Include="Microsoft.AspNetCore.DataProtection" />
<Using Include="Refit" />
<Using Include="Microsoft.FeatureManagement" />
<Using Include="PostFundManagement.Domain.Attributes" />
</ItemGroup>
<ItemGroup>