Skip to content
Closed
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
35 changes: 35 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# CodeQL SAST analysis for the .github standards repository.
# This repo contains GitHub Actions workflows, so 'actions' is the configured language.
# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md#2-codeql-analysis-codeqlyml
name: CodeQL Analysis

permissions: {}

on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '0 17 * * 5' # Weekly scan (Friday 12:00 PM EST / 17:00 UTC)

Copilot AI Apr 7, 2026

Copy link

Choose a reason for hiding this comment

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

The inline comment mixes a fixed UTC cron with a fixed 'EST' local time; this becomes inaccurate during daylight saving time (ET shifts between UTC-4/UTC-5). Prefer describing this as '12:00 PM ET' with a DST note, or remove the local-time conversion and keep the comment purely in UTC to avoid future confusion.

Suggested change
- cron: '0 17 * * 5' # Weekly scan (Friday 12:00 PM EST / 17:00 UTC)
- cron: '0 17 * * 5' # Weekly scan (Friday 12:00 PM ET during standard time / 1:00 PM ET during daylight saving time; 17:00 UTC)

Copilot uses AI. Check for mistakes.

jobs:
analyze:
name: Analyze (actions)
runs-on: ubuntu-latest

Copilot AI Apr 7, 2026

Copy link

Choose a reason for hiding this comment

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

ubuntu-latest can change underlying OS versions, which can cause unexpected workflow differences over time. If stability/reproducibility is required for compliance workflows, consider pinning to a specific runner image (e.g., ubuntu-24.04 or ubuntu-22.04) consistent with your CI standards.

Suggested change
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

Copilot uses AI. Check for mistakes.
permissions:
actions: read
contents: read
security-events: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: actions

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
Comment on lines +28 to +33

Copilot AI Apr 7, 2026

Copy link

Choose a reason for hiding this comment

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

The CodeQL actions are referenced by a moving tag (@v4). If your repo/org policy is aiming for supply-chain hardening (similar to the pinned actions/checkout), pin github/codeql-action/* to immutable commit SHAs as well (and keep them updated via Dependabot). This reduces the risk of a compromised upstream tag affecting your workflow.

Suggested change
uses: github/codeql-action/init@v4
with:
languages: actions
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
uses: github/codeql-action/init@3c5c3a4a0f3f64e64d5d4e9f7e3f2db279b9da86 # v4
with:
languages: actions
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@3c5c3a4a0f3f64e64d5d4e9f7e3f2db279b9da86 # v4

Copilot uses AI. Check for mistakes.
Comment on lines +28 to +33

Copilot AI Apr 7, 2026

Copy link

Choose a reason for hiding this comment

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

The CodeQL actions are referenced by a moving tag (@v4). If your repo/org policy is aiming for supply-chain hardening (similar to the pinned actions/checkout), pin github/codeql-action/* to immutable commit SHAs as well (and keep them updated via Dependabot). This reduces the risk of a compromised upstream tag affecting your workflow.

Suggested change
uses: github/codeql-action/init@v4
with:
languages: actions
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
uses: github/codeql-action/init@3fcb8f7314c2e7c6b6bc3b5b7f9a1f4e6d2c9a55 # v4
with:
languages: actions
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@3fcb8f7314c2e7c6b6bc3b5b7f9a1f4e6d2c9a55 # v4

Copilot uses AI. Check for mistakes.
with:
category: /language:actions
Loading