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
This commit is contained in:
2026-03-07 17:32:32 +02:00
parent 2ba2d02d47
commit 497729f74d

View File

@@ -1,6 +1,7 @@
--- ---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: "CodeQL" name: "CodeQL"
on: on:
push: push:
branches: ["main"] branches: ["main"]
@@ -10,15 +11,16 @@ on:
- cron: "22 8 * * 0" - cron: "22 8 * * 0"
merge_group: merge_group:
permissions: permissions: {}
actions: read
contents: read
jobs: jobs:
analyze: analyze:
name: Analyze name: Analyze
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
actions: read
contents: read
packages: read
security-events: write security-events: write
strategy: strategy:
fail-fast: false fail-fast: false
@@ -26,6 +28,6 @@ jobs:
language: ["actions", "javascript-typescript"] language: ["actions", "javascript-typescript"]
steps: steps:
- name: CodeQL Analysis - name: CodeQL Analysis
uses: ivuorinen/actions/codeql-analysis@main uses: ivuorinen/actions/codeql-analysis@97105fc2a909360678588cb50caf0be5144be486 # v2026.03.06
with: with:
language: ${{ matrix.language }} language: ${{ matrix.language }}