Skip to content

Commit 2d5b355

Browse files
committed
security(semgrep): test run semgrep full
1 parent 98d4744 commit 2d5b355

1 file changed

Lines changed: 15 additions & 18 deletions

File tree

.github/workflows/security.yml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,26 @@ jobs:
2323
steps:
2424
- uses: actions/checkout@v4
2525
- name: Run Semgrep (diff only)
26-
run: semgrep ci --config auto --sarif --output semgrep.sarif
27-
env:
28-
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
29-
- uses: github/codeql-action/upload-sarif@v3
30-
if: always()
31-
with:
32-
sarif_file: semgrep.sarif
26+
run: semgrep ci --config auto
3327

34-
# Scan complet sur push main et releases (thorough)
3528
semgrep-full:
3629
name: Semgrep SAST (full)
37-
if: github.event_name == 'push' || github.event_name == 'release' || github.event_name == 'workflow_dispatch'
30+
if: github.event_name == 'push' || github.event_name == 'release' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'
3831
runs-on: ubuntu-latest
3932
container:
4033
image: semgrep/semgrep
4134
steps:
4235
- uses: actions/checkout@v4
43-
- name: Run Semgrep (full scan)
44-
run: semgrep scan --config auto --sarif --output semgrep.sarif
45-
# 👆 "scan" au lieu de "ci" = scan complet, pas de diff
46-
env:
47-
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
48-
- uses: github/codeql-action/upload-sarif@v3
49-
if: always()
50-
with:
51-
sarif_file: semgrep.sarif
36+
- name: Run Semgrep (WARNING severity)
37+
run: |
38+
semgrep scan \
39+
--config auto \
40+
--severity WARNING \
41+
exit 0 # Ne jamais bloquer ce job
42+
43+
- name: Run Semgrep (ERROR severity only)
44+
run: |
45+
semgrep scan \
46+
--config auto \
47+
--severity ERROR \
48+
--error

0 commit comments

Comments
 (0)