-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
samatstarion
committed
Oct 9, 2024
1 parent
2e19f7c
commit 5fd53da
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |