From d08b20a97283b988949a68b9d463c785a223ccc0 Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Mon, 28 Sep 2026 12:41:37 -0400 Subject: [PATCH 1/2] ci: add CodeQL code scanning Code scanning has never run on this repository. Analyze JavaScript/ TypeScript and GitHub Actions workflows on pushes and pull requests to canary, plus a weekly scheduled scan. PHP is not supported by CodeQL. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/codeql.yml | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 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 000000000..37a053adf --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,38 @@ +name: CodeQL + +on: + push: + branches: [canary] + pull_request: + branches: [canary] + schedule: + - cron: '0 6 * * 1' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + strategy: + fail-fast: false + matrix: + language: [actions, javascript-typescript] + steps: + - name: Checkout repo + uses: actions/checkout@v5 + - name: Initialize CodeQL + uses: github/codeql-action/init@v4 + with: + languages: ${{ matrix.language }} + build-mode: none + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v4 + with: + category: '/language:${{ matrix.language }}' From 6572650516fbd786be4f9658c521a2727ac3425f Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Mon, 28 Sep 2026 12:55:17 -0400 Subject: [PATCH 2/2] ci: note PHP is in beta and drop checkout credentials in CodeQL --- .github/workflows/codeql.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 37a053adf..b52ffca42 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,5 +1,12 @@ name: CodeQL +# Scans our JavaScript/TypeScript and GitHub Actions workflow definitions on +# every PR, every push to canary, and weekly so results refresh against newly +# published query packs even when the code hasn't changed. +# +# PHP support is in beta on CodeQL. Add it for plugins/faustwp once the +# language pack is stable. + on: push: branches: [canary] @@ -27,6 +34,9 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v5 + with: + persist-credentials: false + # init and analyze must stay on the same version. - name: Initialize CodeQL uses: github/codeql-action/init@v4 with: