Skip to content

Commit 4948ea3

Browse files
authored
add semgrep (#283)
**Why I did it** [Semgrep](https://github.com/returntocorp/semgrep) is a static analysis tool to find security vulnerabilities. When opening a PR or commtting to PR, Semgrep performs a diff-aware scanning, which scans changed files in PRs. When merging PR, Semgrep performs a full scan on master branch and report all findings. Ref: - [Supported Language](https://semgrep.dev/docs/supported-languages/#language-maturity) - [Semgrep Rules](https://registry.semgrep.dev/rule) **How I did it** Integrate Semgrep into this repository by committing a job configuration file
1 parent 4622b8d commit 4948ea3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/semgrep.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Semgrep
2+
3+
on:
4+
pull_request: {}
5+
push:
6+
branches:
7+
- master
8+
- '201[7-9][0-1][0-9]'
9+
- '202[0-9][0-1][0-9]'
10+
11+
jobs:
12+
semgrep:
13+
if: github.repository_owner == 'sonic-net'
14+
name: Semgrep
15+
runs-on: ubuntu-latest
16+
container:
17+
image: returntocorp/semgrep
18+
steps:
19+
- uses: actions/checkout@v3
20+
- run: semgrep ci
21+
env:
22+
SEMGREP_RULES: p/default

0 commit comments

Comments
 (0)