Skip to content

Commit 8677daa

Browse files
committed
security(semgrep): add a semgrep workflows
1 parent e1aeacb commit 8677daa

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/security.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Security Scans
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
release:
8+
types:
9+
- published
10+
- edited
11+
pull_request:
12+
branches:
13+
- main
14+
workflow_dispatch:
15+
16+
jobs:
17+
semgrep:
18+
name: Semgrep SAST
19+
runs-on: ubuntu-latest
20+
container:
21+
image: semgrep/semgrep
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Run Semgrep
27+
run: semgrep ci --config auto --sarif --output semgrep.sarif
28+
env:
29+
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} # Optionnel
30+
31+
- name: Upload results to GitHub Security
32+
uses: github/codeql-action/upload-sarif@v3
33+
if: always()
34+
with:
35+
sarif_file: semgrep.sarif

0 commit comments

Comments
 (0)