From 6a7d502b685a34a946f9f6bc2bb278dfbec68546 Mon Sep 17 00:00:00 2001 From: Boshen Date: Wed, 22 Jul 2026 14:06:37 +0800 Subject: [PATCH] ci(semgrep): add scan workflow --- .github/workflows/semgrep.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 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..031977c --- /dev/null +++ b/.github/workflows/semgrep.yml @@ -0,0 +1,26 @@ +name: Semgrep + +permissions: {} + +on: + workflow_dispatch: + pull_request: + types: [opened, synchronize] + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.ref_name != 'main' }} + +jobs: + semgrep: + name: Semgrep + runs-on: ubuntu-latest + container: + image: semgrep/semgrep:1.170.0 + steps: + - uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2 + + - run: semgrep scan --config auto