From 5097da22dab0fcea8b5ed58871cdee013b2447d0 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 29 May 2025 08:56:05 +0000 Subject: [PATCH] Add Semgrep diff scan workflow Co-Authored-By: shashvat@zamp.ai --- .github/workflows/semgrep-scan-diff.yaml | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/semgrep-scan-diff.yaml diff --git a/.github/workflows/semgrep-scan-diff.yaml b/.github/workflows/semgrep-scan-diff.yaml new file mode 100644 index 0000000..0bb8748 --- /dev/null +++ b/.github/workflows/semgrep-scan-diff.yaml @@ -0,0 +1,26 @@ +name: Semgrep diff scan +on: + workflow_dispatch: {} + pull_request: + branches: [ "main" ] + +jobs: + semgrep: + name: semgrep/ci + runs-on: ubuntu-latest + env: + SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} + container: + image: semgrep/semgrep + if: (github.actor != 'dependabot[bot]') + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set baseline ref + run: | + echo "SEMGREP_BASELINE_REF=origin/${GITHUB_BASE_REF}" >> $GITHUB_ENV + + - name: Run Semgrep + run: semgrep ci