Skip to content

Commit 6e1eb6c

Browse files
authored
Merge pull request #16 from Starttoaster/tests
Move semgrep to individual workflow with security-events permissions
2 parents c0d0af5 + 599636b commit 6e1eb6c

File tree

2 files changed

+29
-18
lines changed

2 files changed

+29
-18
lines changed

.github/workflows/semgrep.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Semgrep
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
permissions:
10+
contents: read
11+
security-events: read
12+
13+
jobs:
14+
scan:
15+
runs-on: ubuntu-latest
16+
container:
17+
image: semgrep/semgrep
18+
if: (github.actor != 'dependabot[bot]')
19+
steps:
20+
- uses: actions/checkout@v4
21+
- run: semgrep scan --config=auto --sarif --output=semgrep.sarif
22+
env:
23+
SEMGREP_RULES: auto
24+
- name: Upload SARIF file
25+
uses: github/codeql-action/upload-sarif@v4
26+
with:
27+
sarif_file: semgrep.sarif
28+
category: semgrep
29+
if: always()

.github/workflows/test.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -67,21 +67,3 @@ jobs:
6767
run: |
6868
go install golang.org/x/lint/golint@latest
6969
golint -set_exit_status ./...
70-
71-
semgrep:
72-
name: semgrep/ci
73-
runs-on: ubuntu-latest
74-
container:
75-
image: semgrep/semgrep
76-
if: (github.actor != 'dependabot[bot]')
77-
steps:
78-
- uses: actions/checkout@v4
79-
- run: semgrep scan --config=auto --sarif --output=semgrep.sarif
80-
env:
81-
SEMGREP_RULES: auto
82-
- name: Upload SARIF file
83-
uses: github/codeql-action/upload-sarif@v4
84-
with:
85-
sarif_file: semgrep.sarif
86-
category: semgrep
87-
if: always()

0 commit comments

Comments
 (0)