Skip to content

Semgrep Supply Chain #9

Semgrep Supply Chain

Semgrep Supply Chain #9

Workflow file for this run

name: Semgrep Supply Chain
on:
schedule:
- cron: '0 6 * * *'
workflow_dispatch:
permissions:
contents: read
security-events: write
jobs:
run-semgrep-scan:
name: Run Semgrep Scan
runs-on: ubuntu-latest
env:
SEMGREP_REPO_NAME: ${{ github.repository }}
SEMGREP_COMMIT: ${{ github.sha }}
SEMGREP_APP_TOKEN: ${{secrets.SEMGREP_APP_TOKEN}}
container:
image: semgrep/semgrep:1.125.0
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- name: Configure git
run: git config --global --add safe.directory "$(pwd)"
- name: Run Semgrep Scan
run: |
semgrep ci --sarif-output=semgrep-report.sarif
- name: Upload to Security Tab
uses: github/codeql-action/upload-sarif@v4
if: ${{ always() && github.event.repository.visibility == 'public' }}
with:
sarif_file: semgrep-report.sarif
category: semgrep