From 7a4f66958ac63294e898b43c864f9b77388a308b Mon Sep 17 00:00:00 2001 From: David Stone Date: Fri, 12 Jun 2026 16:57:54 -0600 Subject: [PATCH 1/3] ci: add CodeQL analysis workflow --- .github/workflows/codeql.yml | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 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..6ac3fbb4 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,44 @@ +name: CodeQL + +on: + push: + branches: [main] + pull_request: + branches: [main] + schedule: + - cron: '32 4 * * 1' + workflow_dispatch: + +permissions: + actions: read + contents: read + pull-requests: read + security-events: write + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ubuntu-latest + timeout-minutes: 20 + + strategy: + fail-fast: false + matrix: + language: + - javascript-typescript + - php + + steps: + - name: Checkout repository + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + queries: +security-and-quality + + - name: Perform CodeQL analysis + uses: github/codeql-action/analyze@v3 + with: + category: /language:${{ matrix.language }} From 5a51d77279c300e9a7b82e7b3da100e6147299a2 Mon Sep 17 00:00:00 2001 From: David Stone Date: Fri, 12 Jun 2026 17:00:18 -0600 Subject: [PATCH 2/3] ci: limit CodeQL to supported languages --- .github/workflows/codeql.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 6ac3fbb4..fcb3a8c1 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -26,7 +26,6 @@ jobs: matrix: language: - javascript-typescript - - php steps: - name: Checkout repository From e8d167e5aa419ace2e9ff22259b10ab470ecbb45 Mon Sep 17 00:00:00 2001 From: David Stone Date: Fri, 12 Jun 2026 17:12:16 -0600 Subject: [PATCH 3/3] ci: harden CodeQL workflow actions --- .github/workflows/codeql.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index fcb3a8c1..43e27545 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -30,14 +30,16 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + with: + persist-credentials: false - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@dd903d2e4f5405488e5ef1422510ee31c8b32357 # v3 with: languages: ${{ matrix.language }} queries: +security-and-quality - name: Perform CodeQL analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@dd903d2e4f5405488e5ef1422510ee31c8b32357 # v3 with: category: /language:${{ matrix.language }}