2022-11-20 09:53:11 +00:00
|
|
|
---
|
|
|
|
name: Semgrep Full Scan
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
branches:
|
2022-11-20 10:58:15 +00:00
|
|
|
- master
|
2022-11-20 09:53:11 +00:00
|
|
|
schedule:
|
2023-01-27 16:22:17 +00:00
|
|
|
- cron: "0 1 * * 6"
|
2022-11-20 09:53:11 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
semgrep-full:
|
2023-01-27 16:22:17 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
2024-09-21 11:10:59 +00:00
|
|
|
image: semgrep/semgrep
|
2023-01-27 16:22:17 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
# step 1
|
|
|
|
- name: clone application source code
|
2024-05-13 08:47:40 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-01-27 16:22:17 +00:00
|
|
|
|
|
|
|
# step 2
|
|
|
|
- name: full scan
|
|
|
|
run: |
|
|
|
|
semgrep \
|
|
|
|
--sarif --output report.sarif \
|
|
|
|
--metrics=off \
|
|
|
|
--config="p/default"
|
|
|
|
|
|
|
|
# step 3
|
|
|
|
- name: save report as pipeline artifact
|
2024-05-13 08:47:40 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-01-27 16:22:17 +00:00
|
|
|
with:
|
|
|
|
name: report.sarif
|
2024-05-13 08:47:40 +00:00
|
|
|
overwrite: true
|
2023-01-27 16:22:17 +00:00
|
|
|
path: report.sarif
|
|
|
|
|
|
|
|
# step 4
|
|
|
|
- name: publish code scanning alerts
|
2024-05-13 08:47:40 +00:00
|
|
|
uses: github/codeql-action/upload-sarif@v3
|
2023-01-27 16:22:17 +00:00
|
|
|
with:
|
|
|
|
sarif_file: report.sarif
|
|
|
|
category: semgrep
|