Skip to content

Commit 55087fe

Browse files
ci: add Semgrep OSS scanning workflow (#358)
1 parent 792f5ff commit 55087fe

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/semgrep.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Semgrep OSS scan
2+
on:
3+
pull_request: {}
4+
push:
5+
branches: [main, master]
6+
workflow_dispatch: {}
7+
schedule:
8+
- cron: '0 0 1-7 * 6' # per-repo, staggered across month
9+
concurrency:
10+
group: semgrep-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
11+
cancel-in-progress: true
12+
permissions:
13+
contents: read
14+
jobs:
15+
semgrep:
16+
name: semgrep-oss
17+
runs-on: ubuntu-slim
18+
steps:
19+
- uses: actions/checkout@v5
20+
with:
21+
fetch-depth: 1
22+
- id: cache-semgrep
23+
uses: actions/cache@v5
24+
with:
25+
path: ~/.local
26+
key: semgrep-1.160.0-${{ runner.os }}
27+
- if: steps.cache-semgrep.outputs.cache-hit != 'true'
28+
run: pip install --user semgrep==1.160.0
29+
- run: echo "$HOME/.local/bin" >> "$GITHUB_PATH"
30+
- run: semgrep scan --config=auto

0 commit comments

Comments
 (0)