From 3404cf530fc5776cd3083f5925a39b2a05bbca99 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Sat, 7 Mar 2026 19:14:38 +0200 Subject: [PATCH] ci: migrate CodeQL to ivuorinen/actions/codeql-analysis (#131) * ci: migrate codeql to composable workflow * fix: correct codeql workflow language, queries, permissions, and action ref - Use 'javascript' instead of 'javascript-typescript' for CodeQL language - Add queries: security-and-quality parameter - Set root-level permissions to {} - Add job-level permissions (actions, contents, packages, security-events) - Pin action ref to commit hash with version comment - Fix mangled cron schedule --- .github/workflows/codeql.yml | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 6d819a0..7cd5c89 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -8,39 +8,27 @@ on: pull_request: branches: ["main"] schedule: - - cron: "30 1 * * 0" # Run at 1:30 AM UTC every Sunday + - cron: "30 1 * * 0" merge_group: -permissions: - actions: read - contents: read +permissions: {} jobs: analyze: name: Analyze runs-on: ubuntu-latest permissions: + actions: read + contents: read + packages: read security-events: write - strategy: fail-fast: false matrix: - language: ['actions'] # Add languages used in your actions - + language: ["actions"] steps: - - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - - name: Initialize CodeQL - uses: github/codeql-action/init@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4 + - name: CodeQL Analysis + uses: ivuorinen/actions/codeql-analysis@97105fc2a909360678588cb50caf0be5144be486 # v2026.03.06 with: - languages: ${{ matrix.language }} + language: ${{ matrix.language }} queries: security-and-quality - - - name: Autobuild - uses: github/codeql-action/autobuild@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4 - with: - category: "/language:${{matrix.language}}"