Skip to content

Commit bef5420

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

2 files changed

Lines changed: 49 additions & 51 deletions

File tree

.github/workflows/security.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

.github/workflows/semgrep.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Semgrep
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- '**'
8+
release:
9+
types:
10+
- published
11+
- edited
12+
pull_request:
13+
branches:
14+
- main
15+
workflow_dispatch:
16+
17+
jobs:
18+
semgrep-diff:
19+
name: Semgrep SAST (diff)
20+
if: github.event_name == 'pull_request' && (github.event_name == 'push' && github.ref != 'refs/heads/main')
21+
runs-on: ubuntu-latest
22+
container:
23+
image: semgrep/semgrep
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Run Semgrep (diff only)
27+
run: semgrep ci --config auto
28+
29+
semgrep-full:
30+
name: Semgrep SAST (full)
31+
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
32+
runs-on: ubuntu-latest
33+
container:
34+
image: semgrep/semgrep
35+
steps:
36+
- uses: actions/checkout@v4
37+
- name: Run Semgrep (WARNING severity)
38+
run: |
39+
semgrep scan \
40+
--config auto \
41+
--severity WARNING
42+
exit 0 # Ne jamais bloquer ce job
43+
44+
- name: Run Semgrep (ERROR severity only)
45+
run: |
46+
semgrep scan \
47+
--config auto \
48+
--severity ERROR \
49+
--error

0 commit comments

Comments
 (0)