From 31cff4cbcb8fe70ec7d23c02f10d5732e7d15008 Mon Sep 17 00:00:00 2001 From: Jared Date: Sat, 8 Aug 2026 17:29:39 +0000 Subject: [PATCH] chore: add semgrep GitHub action --- .github/workflows/semgrep.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 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 0000000..e6dd9d5 --- /dev/null +++ b/.github/workflows/semgrep.yml @@ -0,0 +1,35 @@ +name: Semgrep + +on: + pull_request: {} + workflow_dispatch: {} + push: + branches: + - main + - master + paths: + - .github/workflows/semgrep.yml + schedule: + - cron: '20 17 * * *' + +permissions: + contents: read + +jobs: + semgrep: + name: semgrep/ci + runs-on: ubuntu-latest + container: + image: semgrep/semgrep@sha256:65dcd4408adda7c183a6b4550cb1e9b19f7f627a6fbb7e0559bd466bedc44d7b + + steps: + - uses: actions/checkout@v6 + + - run: semgrep scan --config auto --sarif --output semgrep.sarif + env: + SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} + + - name: Upload Semgrep results to GitHub Security tab + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: semgrep.sarif