From 1853981eb2a5bd19cdd78562498eb7ff74bcb95b Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Sat, 7 Mar 2026 17:32:37 +0200 Subject: [PATCH] fix: correct codeql workflow permissions, cron, and action ref - 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 - Clean up workflow structure --- .github/workflows/codeql.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 3807670..026d7bb 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,24 +1,26 @@ --- # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json name: "CodeQL" + on: push: branches: ["main"] pull_request: branches: ["main"] schedule: - - cron: " - 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 @@ -26,6 +28,6 @@ jobs: language: ["actions", "javascript-typescript"] steps: - name: CodeQL Analysis - uses: ivuorinen/actions/codeql-analysis@main + uses: ivuorinen/actions/codeql-analysis@97105fc2a909360678588cb50caf0be5144be486 # v2026.03.06 with: language: ${{ matrix.language }}