Skip to content

Commit bc6558b

Browse files
authored
Merge pull request #65 from upstox/yogendrasrivastava-patch-1
Create semgrep.yml
2 parents 8c9f064 + 25006ed commit bc6558b

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/semgrep.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Name of this GitHub Actions workflow.
2+
name: Semgrep
3+
4+
on:
5+
# Scan changed files in PRs (diff-aware scanning):
6+
pull_request: {}
7+
# Scan on-demand through GitHub Actions interface:
8+
workflow_dispatch: {}
9+
# Scan mainline branches and report all findings:
10+
push:
11+
branches: ["master", "main"]
12+
# Schedule the CI job (this method uses cron syntax):
13+
schedule:
14+
- cron: '20 17 * * *' # Sets Semgrep to scan every day at 17:20 UTC.
15+
# It is recommended to change the schedule to a random time.
16+
17+
jobs:
18+
semgrep:
19+
# User definable name of this GitHub Actions job.
20+
name: semgrep/ci
21+
# If you are self-hosting, change the following `runs-on` value:
22+
runs-on: ubuntu-latest
23+
24+
container:
25+
# A Docker image with Semgrep installed. Do not change this.
26+
image: returntocorp/semgrep
27+
28+
# Skip any PR created by dependabot to avoid permission issues:
29+
if: (github.actor != 'dependabot[bot]')
30+
31+
steps:
32+
# Fetch project source with GitHub Actions Checkout.
33+
- uses: actions/checkout@v3
34+
# Run the "semgrep ci" command on the command line of the docker image.
35+
- run: semgrep ci
36+
env:
37+
# Connect to Semgrep Cloud Platform through your SEMGREP_APP_TOKEN.
38+
# Generate a token from Semgrep Cloud Platform > Settings
39+
# and add it to your GitHub secrets.
40+
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}

0 commit comments

Comments
 (0)