Skip to content

Commit

Permalink
[Add] Semgrep OWASP Top Ten scanning GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
samatstariongroup committed Oct 9, 2024
1 parent 6ea45be commit 969366a
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Semgrep OWASP Top Ten

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

jobs:

semgrep-full:
runs-on: ubuntu-latest
container:
image: semgrep/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 scan --config "https://semgrep.dev/p/owasp-top-ten" --sarif --output=semgrep-sast.sarif --metrics=off
- name: save report as pipeline artifact
uses: actions/upload-artifact@v4
with:
name: semgrep-sast.sarif
path: semgrep-sast.sarif

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

0 comments on commit 969366a

Please sign in to comment.