From b091160fee9b5745f9ec978d8c959ea07afa8221 Mon Sep 17 00:00:00 2001 From: Harshit Gupta Date: Fri, 6 Mar 2026 22:24:40 -0800 Subject: [PATCH] feat: add CodeQL security analysis workflow Scan JavaScript/TypeScript and Python code for security vulnerabilities on PRs to main, pushes to main, and weekly schedule. Uses security-extended query suite for broader coverage. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/codeql.yml | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..80dc5298 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,41 @@ +name: CodeQL + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + schedule: + # Run weekly on Mondays at 3 AM UTC + - cron: "0 3 * * 1" + +permissions: + security-events: write + contents: read + actions: read + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + language: [ javascript-typescript, python ] + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + queries: +security-extended + + - name: Autobuild + uses: github/codeql-action/autobuild@v3 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{ matrix.language }}"