diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..dc5d677 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,42 @@ +name: CodeQL + +on: + push: + branches: [main] + pull_request: + # No paths-ignore: every PR must post the status so branch protection + # required checks ("Analyze (javascript-typescript)") never stay + # stuck in "Expected — Waiting for status to be reported". + schedule: + - cron: "0 6 * * 1" + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ubuntu-latest + permissions: + security-events: write + actions: read + contents: read + strategy: + fail-fast: false + matrix: + language: [javascript-typescript, actions] + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + queries: security-and-quality + - uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{ matrix.language }}" diff --git a/AGENTS.md b/AGENTS.md index e167e65..005bfa0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -215,6 +215,7 @@ before any of the rules below. shell injection. - Do not skip CI hooks (`--no-verify`, `[skip ci]`, `[ci skip]`) without an explicit reason in the PR description. +- Every new test added must run in a CI job, and every new CI job that gates correctness must be added to `main`'s required status checks in the same PR. ## 15. Accessibility (frontend)