Skip to content

Commit be8d462

Browse files
authored
Merge pull request #67 from melodee-project/fix-pr-66
Fix pr 66
2 parents e56b8d4 + f4a907d commit be8d462

7 files changed

Lines changed: 43 additions & 24 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM mcr.microsoft.com/dotnet/aspnet:10.0.4
2+
3+
WORKDIR /app
4+
5+
RUN apt-get update && \
6+
apt-get install -y --no-install-recommends \
7+
ffmpeg \
8+
postgresql-client \
9+
curl \
10+
lbzip2 \
11+
&& rm -rf /var/lib/apt/lists/*
12+
13+
COPY scan/publish/ .
14+
15+
ENTRYPOINT ["dotnet", "server.dll"]

.github/workflows/dotnet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Setup .NET
2323
uses: actions/setup-dotnet@v4
2424
with:
25-
dotnet-version: 10.0.x
25+
dotnet-version: 10.0.104
2626
- name: Restore dependencies
2727
run: dotnet restore
2828
- name: Validate localization resources

.github/workflows/gitleaks.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,20 @@ jobs:
2929
with:
3030
fetch-depth: 0
3131

32-
- name: Run gitleaks
33-
uses: gitleaks/gitleaks-action@v2
34-
env:
35-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36-
GITLEAKS_ENABLE_COMMENTS: true
37-
GITLEAKS_ENABLE_SARIF: true
38-
GITLEAKS_SARIF_FILE: gitleaks.sarif
32+
- name: Run gitleaks on pull request commits
33+
if: github.event_name == 'pull_request'
34+
uses: docker://zricethezav/gitleaks:v8.30.0
35+
with:
36+
args: detect --source . --redact --report-format sarif --report-path gitleaks.sarif --exit-code 1 --log-opts=${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
37+
38+
- name: Run gitleaks on pushed commits
39+
if: github.event_name == 'push'
40+
uses: docker://zricethezav/gitleaks:v8.30.0
41+
with:
42+
args: detect --source . --redact --report-format sarif --report-path gitleaks.sarif --exit-code 1 --log-opts=${{ github.event.before }}..${{ github.sha }}
3943

4044
- name: Upload SARIF results
41-
if: always()
45+
if: always() && hashFiles('gitleaks.sarif') != ''
4246
uses: github/codeql-action/upload-sarif@v4
4347
with:
4448
sarif_file: gitleaks.sarif

.github/workflows/localization.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
- name: Setup .NET
6565
uses: actions/setup-dotnet@v4
6666
with:
67-
dotnet-version: 10.0.x
67+
dotnet-version: 10.0.104
6868

6969
- name: Restore dependencies
7070
run: dotnet restore

.github/workflows/sca-container-scan.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,6 @@ jobs:
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
@@ -80,7 +80,7 @@ jobs:
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: |

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
<PropertyGroup>
33
<AllowMissingPrunePackageData>true</AllowMissingPrunePackageData>
44
</PropertyGroup>
5-
</Project>
5+
</Project>

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "10.0.100",
4-
"rollForward": "latestMinor"
3+
"version": "10.0.104",
4+
"rollForward": "latestPatch"
55
}
66
}

0 commit comments

Comments
 (0)