Skip to content

Commit b28085d

Browse files
Adding Semgrep and Codeowner file
1 parent ec3ff83 commit b28085d

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.github/workflows/CODEOWNER

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# CODEOWNERS
2+
* @upstox-security-review

.github/workflows/semgrep.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
on:
2+
workflow_dispatch: {}
3+
pull_request: {}
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- .github/workflows/semgrep.yml
9+
schedule:
10+
# random HH:MM to avoid a load spike on GitHub Actions at 00:00
11+
- cron: '45 13 * * *'
12+
13+
name: Semgrep
14+
15+
jobs:
16+
semgrep:
17+
name: semgrep/ci
18+
runs-on: ubuntu-20.04
19+
env:
20+
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
21+
container:
22+
image: returntocorp/semgrep
23+
steps:
24+
- uses: actions/checkout@v3
25+
- run: |
26+
echo "Running semgrep"
27+
semgrep ci
28+
29+
approve:
30+
name: Approve PR if Semgrep passes
31+
runs-on: ubuntu-20.04
32+
needs: semgrep
33+
steps:
34+
- name: Setup GitHub CLI
35+
uses: actions/checkout@v3
36+
- name: Approve PR
37+
if: success()
38+
run: gh pr review --approve "${{ github.event.pull_request.html_url }}"
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.PAT_SECURITYREVIEWUSER }}

0 commit comments

Comments
 (0)