Skip to content

Semgrep

Semgrep #7894

Workflow file for this run

name: Semgrep
on:
workflow_dispatch: {}
pull_request: {}
push:
branches:
- main
- master
paths:
- .github/workflows/semgrep.yml
schedule:
# random HH:MM to avoid a load spike on GitHub Actions at 00:00
- cron: '4 12 * * *'
permissions:
contents: read
security-events: write # For uploading SARIF results
jobs:
semgrep:
name: semgrep/ci
runs-on: ubuntu-24.04
timeout-minutes: 15
env:
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
container:
image: semgrep/semgrep
if: (github.actor != 'dependabot[bot]')
steps:
- name: Harden Runner
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Run Semgrep
run: semgrep ci --sarif --output=semgrep.sarif || true
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@16140ae1a102900babc80a33c44059580f687047 # v4.30.9
if: always()
with:
sarif_file: semgrep.sarif