3636 fail-on-severity : high
3737 # Comment on pull requests with details
3838 comment-summary-in-pr : on-failure
39- # Output format for GitHub Security tab
40- sarif-output : srp-results.sarif
41-
42- - name : Upload SARIF results
43- if : always()
44- uses : github/codeql-action/upload-sarif@v4
45- with :
46- sarif_file : srp-results.sarif
47- category : " dependency-review"
4839
4940 container-scan :
5041 name : Container Image Scan
@@ -58,13 +49,22 @@ jobs:
5849 - name : Checkout repository
5950 uses : actions/checkout@v4
6051
52+ - name : Setup .NET
53+ uses : actions/setup-dotnet@v4
54+ with :
55+ dotnet-version : 10.0.104
56+
57+ - name : Publish application for scanning
58+ run : dotnet publish src/Melodee.Blazor/Melodee.Blazor.csproj -c Release -o scan/publish --self-contained false -p:PublishTrimmed=false
59+
6160 - name : Set up Docker Buildx
6261 uses : docker/setup-buildx-action@v3
6362
6463 - name : Build Docker image for scanning
6564 uses : docker/build-push-action@v5
6665 with :
6766 context : .
67+ file : .github/docker/Dockerfile.container-scan
6868 load : true
6969 tags : melodee:latest
7070 cache-from : type=gha
8080 limit-severity-skip : false
8181
8282 - name : Upload SARIF results
83- if : always()
83+ if : always() && hashFiles('trivy-results.sarif') != ''
8484 uses : github/codeql-action/upload-sarif@v4
8585 with :
8686 sarif_file : trivy-results.sarif
@@ -100,7 +100,7 @@ jobs:
100100 - name : Setup .NET
101101 uses : actions/setup-dotnet@v4
102102 with :
103- dotnet-version : 10.0.x
103+ dotnet-version : 10.0.104
104104
105105 - name : Check for vulnerable NuGet packages
106106 run : |
0 commit comments