2024-06-05 10:01:18 +00:00
|
|
|
name: Run Semgrep
|
|
|
|
on:
|
2024-06-06 14:34:26 +00:00
|
|
|
workflow_call:
|
2024-06-05 10:01:18 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
semgrep:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: returntocorp/semgrep
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Run Semgrep
|
|
|
|
run: |
|
|
|
|
semgrep \
|
|
|
|
--sarif --output semgrep.sarif \
|
|
|
|
--metrics=off \
|
|
|
|
--config="p/default"
|
|
|
|
|
|
|
|
- name: Save report
|
2024-07-05 09:51:45 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2024-06-05 10:01:18 +00:00
|
|
|
with:
|
|
|
|
name: semgrep.sarif
|
|
|
|
path: semgrep.sarif
|
|
|
|
|
|
|
|
- name: Scanning alerts
|
|
|
|
uses: github/codeql-action/upload-sarif@v3.25.7
|
|
|
|
with:
|
|
|
|
sarif_file: semgrep.sarif
|
2024-07-05 09:51:45 +00:00
|
|
|
category: semgrep
|
|
|
|
|
|
|
|
- name: Mattermost Notification
|
|
|
|
if: always()
|
|
|
|
uses: rtCamp/action-slack-notify@v2.2.0
|
|
|
|
env:
|
|
|
|
SLACK_USERNAME: ${{ github.event.repository.name }}
|
|
|
|
SLACK_WEBHOOK: ${{ secrets.mm-sa-wh-url }}
|
|
|
|
SLACK_COLOR: ${{ job.status }}
|
|
|
|
SLACK_LINK_NAMES: true
|
|
|
|
SLACK_FOOTER: ""
|