From dc60ba62195d1214208e554897654df789c6adcd Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sun, 9 Nov 2025 21:47:39 +0000 Subject: [PATCH] GitHub Actions: Security scanning with Semgrep cgen-f9fb3056ab9f486998b15f81415846da --- .github/workflows/security.yml | 45 ++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/security.yml diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml new file mode 100644 index 00000000..196156aa --- /dev/null +++ b/.github/workflows/security.yml @@ -0,0 +1,45 @@ +name: Security Scan + +on: + push: + branches: [main, develop] + pull_request: + branches: [main, develop] + schedule: + - cron: '0 2 * * 0' + +jobs: + semgrep: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Run Semgrep + uses: returntocorp/semgrep-action@v1 + with: + generateSarif: true + config: | + p/security-audit + p/typescript + p/react + + - name: Upload SARIF file + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: semgrep.sarif + if: always() + + dependency-check: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Run npm audit + run: npm audit --production --audit-level=moderate + continue-on-error: true + + - name: Check for vulnerable dependencies + run: npm audit --production + continue-on-error: true