Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "CodeQL Advanced"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '18 3 * * 1'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runs-on has a conditional branch for swift, but swift is not part of the matrix. This extra condition adds confusion without effect; consider simplifying runs-on to a single runner or removing the unused swift branch.

Suggested change
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
runs-on: ubuntu-latest

Copilot uses AI. Check for mistakes.
permissions:
security-events: write
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The job sets explicit permissions, but it doesn't grant contents: read. If the repo is configured with restricted default token permissions, actions/checkout and CodeQL init may fail. Consider adding contents: read (and optionally actions: read per CodeQL docs) and only keep packages: read if it’s actually needed.

Suggested change
security-events: write
security-events: write
contents: read
actions: read

Copilot uses AI. Check for mistakes.
packages: read

strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: python
build-mode: none
Comment on lines +23 to +26
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The matrix.include list is mis-indented. As written, the - language: entries are at the same indentation level as include: which makes the YAML invalid (or changes the structure) and will prevent the workflow from running. Indent the list items under include:.

Suggested change
- language: actions
build-mode: none
- language: python
build-mode: none
- language: actions
build-mode: none
- language: python
build-mode: none

Copilot uses AI. Check for mistakes.
steps:
- name: Checkout repository
uses: actions/checkout@v4
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow uses actions/checkout@v4 while other workflows in the repo use actions/checkout@v6 (e.g., .github/workflows/test.yml, .github/workflows/release.yml). Consider bumping to @v6 for consistency and to pick up the latest fixes.

Suggested change
uses: actions/checkout@v4
uses: actions/checkout@v6

Copilot uses AI. Check for mistakes.

- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"
Comment on lines +28 to +40
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The steps list is mis-indented: the - name: entries are aligned with steps: instead of being nested under it. This makes the workflow YAML invalid and will cause the job to fail to parse. Indent each step item under steps:.

Suggested change
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"

Copilot uses AI. Check for mistakes.
Loading