Skip to content

Commit

Permalink
[Add] semgrep GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
samatstarion committed Oct 9, 2024
1 parent 2e19f7c commit 5fd53da
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Semgrep Full Scan

on:
push:
branches:
- '**'
tags-ignore:
- '*'
pull_request:
schedule:
- cron: '42 2 * * 3'

jobs:

semgrep-full:
runs-on: ubuntu-latest
container:
image: returntocorp/semgrep

steps:

- name: clone application source code
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

- name: full scan
run: |
semgrep \
--sarif --output report.sarif \
--metrics=off \
--config="p/default"
# step 3
- name: save report as pipeline artifact
uses: actions/upload-artifact@v4
with:
name: report.sarif
path: report.sarif

# step 4
- name: publish code scanning alerts
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: report.sarif
category: semgrep

0 comments on commit 5fd53da

Please sign in to comment.