Skip to content

Commit 57526eb

Browse files
committed
chore: improve github workflow
1 parent da41748 commit 57526eb

4 files changed

Lines changed: 25 additions & 18 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
flutter test
6464
6565
gitleaks:
66-
name: Gitleaks Secret Scanning
66+
name: Scan for leaks with Gitleaks
6767
runs-on: ubuntu-latest
6868
timeout-minutes: 30
6969
permissions:

.github/workflows/codeql.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
if: always()
21
# Software Name: OUDS Flutter
32
# SPDX-FileCopyrightText: Copyright (c) Orange SA
43
# SPDX-License-Identifier: MIT
@@ -27,7 +26,7 @@ concurrency:
2726

2827
jobs:
2928
analyze-dart:
30-
name: Dart & Flutter Analysis
29+
name: Analyze Dart & Flutter code
3130
runs-on: ubuntu-latest
3231
timeout-minutes: 60
3332

@@ -46,7 +45,7 @@ jobs:
4645
uses: ./.github/actions/setup
4746

4847
- name: Cache Pub packages
49-
uses: actions/cache@v4
48+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
5049
with:
5150
path: ~/.pub-cache
5251
key: ${{ runner.os }}-pubcache-${{ hashFiles('**/pubspec.lock') }}

.github/workflows/dartdoc-gh-pages.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,21 @@ jobs:
3232

3333
steps:
3434
- name: Checkout
35-
uses: actions/checkout@v3
35+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3636
with:
3737
submodules: recursive
3838
- name: Setup Dart
39-
uses: dart-lang/setup-dart@v1
39+
uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c # v1.7.1
4040
with:
4141
sdk: stable
4242
- name: Setup environment
4343
uses: ./.github/actions/setup
4444
- name: Setup Pages
45-
uses: actions/configure-pages@v3
45+
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
4646
- name: Setup Ruby
47-
uses: ruby/setup-ruby@v1
47+
uses: ruby/setup-ruby@a6e6f86333f0a2523ece813039b8b4be04560854 # v1.190.0
4848
with:
49-
ruby-version: 3.3.5
49+
ruby-version: 3.3.4
5050
- name: Build with Dartdoc
5151
run: |
5252
cd ouds_core
@@ -62,7 +62,7 @@ jobs:
6262
cp ouds_core/assets/doc/orange_logo.svg ./docs/assets/
6363
cp ouds_core/assets/doc/banner.png ./docs/assets/
6464
- name: Upload artifact
65-
uses: actions/upload-pages-artifact@v3
65+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
6666
with:
6767
path: ./docs
6868

@@ -76,10 +76,10 @@ jobs:
7676

7777
steps:
7878
- name: Checkout repository
79-
uses: actions/checkout@v2
79+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
8080

8181
- name: Download artifact
82-
uses: actions/download-artifact@v4
82+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
8383
with:
8484
name: github-pages
8585

.github/workflows/semgrep.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ concurrency:
2626

2727
jobs:
2828
semgrep:
29-
name: Semgrep SAST Scan
29+
name: Scan for vulnerabilities with Semgrep
3030
runs-on: ubuntu-latest
3131
timeout-minutes: 60
3232

@@ -45,7 +45,7 @@ jobs:
4545

4646
- name: Run Semgrep SAST Analysis
4747
run: |
48-
semgrep ci \
48+
semgrep scan \
4949
--sarif \
5050
--output semgrep.sarif \
5151
--config auto \
@@ -54,13 +54,21 @@ jobs:
5454
--exclude "*.g.dart" \
5555
--exclude "*.freezed.dart" \
5656
--exclude "test/" \
57-
--exclude ".github/"
58-
env:
59-
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
57+
--exclude ".github/" \
58+
.
6059
continue-on-error: true
6160

61+
- name: Check SARIF file
62+
run: |
63+
if [ -f semgrep.sarif ]; then
64+
echo "✅ SARIF generated: $(du -sh semgrep.sarif)"
65+
else
66+
echo "⚠️ SARIF not found, creating empty SARIF..."
67+
echo '{"version":"2.1.0","runs":[{"tool":{"driver":{"name":"Semgrep","rules":[]}},"results":[]}]}' > semgrep.sarif
68+
fi
69+
6270
- name: Upload Semgrep SARIF
63-
uses: github/codeql-action/upload-sarif@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15
71+
uses: github/codeql-action/upload-sarif@b0565cb28b456da32509aef995361ffcc63f40b0 # v3.28.15
6472
with:
6573
sarif_file: semgrep.sarif
6674
category: semgrep-security

0 commit comments

Comments
 (0)