From 10a9d2ab970c47f43860f72619435ad0db91a262 Mon Sep 17 00:00:00 2001 From: Hrushikesh Deshpande Date: Thu, 23 Apr 2026 16:47:26 -0400 Subject: [PATCH] ci: add Semgrep OSS scanning workflow --- .github/workflows/semgrep.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/semgrep.yml diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml new file mode 100644 index 00000000..09dfe25e --- /dev/null +++ b/.github/workflows/semgrep.yml @@ -0,0 +1,30 @@ +name: Semgrep OSS scan +on: + pull_request: {} + push: + branches: [main, master] + workflow_dispatch: {} + schedule: + - cron: '0 0 1-7 * 6' # per-repo, staggered across month +concurrency: + group: semgrep-${{ github.event_name }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true +permissions: + contents: read +jobs: + semgrep: + name: semgrep-oss + runs-on: ubuntu-slim + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 1 + - id: cache-semgrep + uses: actions/cache@v5 + with: + path: ~/.local + key: semgrep-1.160.0-${{ runner.os }} + - if: steps.cache-semgrep.outputs.cache-hit != 'true' + run: pip install --user semgrep==1.160.0 + - run: echo "$HOME/.local/bin" >> "$GITHUB_PATH" + - run: semgrep scan --config=auto