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:37 +02:00
parent 7dc74e96dc
commit 1853981eb2

View File

@@ -1,24 +1,26 @@
--- ---
# 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"]
pull_request: pull_request:
branches: ["main"] branches: ["main"]
schedule: schedule:
- cron: " - cron: '30 1 * * 0' # Run at 1:30 AM UTC every Sunday" - cron: "30 1 * * 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 }}