Skip to content
Open
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
19 changes: 13 additions & 6 deletions .github/codeql-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,18 @@ paths-ignore:
- "**/obj/**"
- "**/*.Tests/**"
- "**/test-results/**"
- "**/node_modules/**"
- "**/.git/**"

paths:
- "UbntSecPilot.WebApi"
- "UbntSecPilot.Application"
- "UbntSecPilot.Domain"
- "UbntSecPilot.Infrastructure"
- "UbntSecPilot.Agents"
- "UbntSecPilot.Agents.Orleans"
- "src/UbntSecPilot.WebApi"
- "src/UbntSecPilot.Application"
- "src/UbntSecPilot.Domain"
- "src/UbntSecPilot.Infrastructure"
- "src/UbntSecPilot.Agents"
- "src/UbntSecPilot.Agents.Orleans"
- "src/UbntSecPilot.AppHost"
- "src/UbntSecPilot.BlazorUI"
- "tests/UbntSecPilot.Application.Tests"
- "tests/UbntSecPilot.Agents.Tests"
- "tests/UbntSecPilot.Orleans.Tests"
16 changes: 8 additions & 8 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
run: dotnet restore ${{ env.SOLUTION_PATH }}

- name: Run security scan
uses: securecodewarrior/github-action-gosec@master
uses: securecodewarrior/github-action-gosec@v1.4.0
with:
args: './...'

Expand All @@ -150,11 +150,11 @@ jobs:
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Log in to Docker Hub (if credentials provided)
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand Down Expand Up @@ -220,24 +220,24 @@ jobs:
dotnet-coverage merge ./coverage/*.cobertura.xml -o coverage.xml -f cobertura

- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
uses: sonarsource/sonarqube-scan-action@v4.2.2
env:
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
SONAR_HOST_URL: http://localhost:9000
with:
args: >
-Dsonar.projectKey=ubnt-secpilot
-Dsonar.projectName=UBNT SecPilot
-Dsonar.projectName="UBNT SecPilot"
-Dsonar.projectVersion=1.0.0
-Dsonar.sources=UbntSecPilot.WebApi,UbntSecPilot.Application,UbntSecPilot.Domain,UbntSecPilot.Infrastructure,UbntSecPilot.Agents,UbntSecPilot.Agents.Orleans
-Dsonar.tests=UbntSecPilot.Application.Tests,UbntSecPilot.Agents.Tests,UbntSecPilot.Orleans.Tests
-Dsonar.sources=src/UbntSecPilot.WebApi,src/UbntSecPilot.Application,src/UbntSecPilot.Domain,src/UbntSecPilot.Infrastructure,src/UbntSecPilot.Agents,src/UbntSecPilot.Agents.Orleans,src/UbntSecPilot.AppHost,src/UbntSecPilot.BlazorUI
-Dsonar.tests=tests/UbntSecPilot.Application.Tests,tests/UbntSecPilot.Agents.Tests,tests/UbntSecPilot.Orleans.Tests
-Dsonar.test.inclusions=**/*Tests.cs,**/*Test.cs
-Dsonar.coverage.exclusions=**/*Test*.cs,**/*Tests.cs,**/*.AssemblyInfo.cs,**/*.AssemblyAttributes.cs,**/Program.cs,**/Startup.cs
-Dsonar.cs.opencover.reportsPaths=coverage.xml
-Dsonar.qualitygate=ubnt-secpilot-quality-gate

- name: SonarQube Quality Gate Check
uses: sonarsource/sonarqube-quality-gate-action@master
uses: sonarsource/sonarqube-quality-gate-action@v1.2.0
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: dotnet restore UbntSecPilot.sln

- name: Build solution
run: dotnet build UbntSecPilot.sln --configuration Release --no-restore
run: dotnet build UbntSecPilot.sln --configuration Release --no-restore --no-incremental

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Use the official .NET 8 runtime image
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:8.0.10 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
EXPOSE 8000
EXPOSE 8501

# Use the SDK image for building
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0.403 AS build
WORKDIR /src

# Copy project files
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.BlazorUI
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build and publish Blazor Server (net8.0)
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0.403 AS build
WORKDIR /src

# Copy project files
Expand All @@ -19,7 +19,7 @@ WORKDIR /src/UbntSecPilot.BlazorUI
RUN dotnet publish -c Release -o /app/publish /p:UseAppHost=false

# Runtime image
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final
FROM mcr.microsoft.com/dotnet/aspnet:8.0.10 AS final
WORKDIR /app
EXPOSE 8080
ENV ASPNETCORE_URLS=http://+:8080
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<ProjectReference Include="../UbntSecPilot.Agents/UbntSecPilot.Agents.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Orleans.Core" Version="8.1.0" />
<PackageReference Include="Microsoft.Orleans.Runtime" Version="8.1.0" />
<PackageReference Include="Microsoft.Orleans.Sdk" Version="8.1.0" />
<PackageReference Include="Microsoft.Orleans.Core" Version="9.2.1" />
<PackageReference Include="Microsoft.Orleans.Runtime" Version="9.2.1" />
<PackageReference Include="Microsoft.Orleans.Sdk" Version="9.2.1" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/UbntSecPilot.AppHost/UbntSecPilot.AppHost.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<ItemGroup>
<PackageReference Include="Aspire.Hosting.AppHost" Version="8.2.0" />
<PackageReference Include="Aspire.Hosting.MongoDB" Version="8.2.0" />
<PackageReference Include="Aspire.Hosting.Redis" Version="8.2.0" />
<PackageReference Include="Aspire.Hosting.Redis" Version="9.5.1" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions src/UbntSecPilot.WebApi/UbntSecPilot.WebApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
<PackageReference Include="MediatR" Version="12.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.17" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.17" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="8.0.2" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.6.2" />
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="8.0.2" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="8.14.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="9.0.6" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="9.0.6" />
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading