Skip to content

Scan v2/main with CodeQL: switch from default setup to a committed advanced-setup workflow #2545

Closed

Description

@cliffhall

Problem

CodeQL runs as default setup (actions, javascript-typescript, weekly), which analyzes only the default branch (main) and PRs into it. Every analysis on record is refs/heads/main or one of the four milestone-merge PRs (#2304, #2381, #2456, #2536). No v2/main work is scanned until the release PR.

That is how the v2.9.0 ReDoS (#2540) surfaced: CodeQL flagged a regression from this milestone's #2423 work only on the milestone-merge PR, and the release was held while it was fixed. The finding should have landed on the PR that introduced it.

Change

Switch to advanced setup: a committed .github/workflows/codeql.yml with

  • push to main and v2/main
  • pull_request against main and v2/main
  • the existing weekly schedule
  • the same languages (actions, javascript-typescript) and the default query suite

Disable default setup in the same change, or the two will double-report.

The workflow's analyze job holds security-events: write, which makes it a credentialed job, so every action it uses must be SHA-pinned (verify:action-pins, #2484) and it gets a timeout-minutes sized from observed runs (AGENTS.md).

This needs no new credential and does not depend on the GitHub App.

Acceptance

  • Code scanning shows analyses for refs/heads/v2/main, and for a PR targeting v2/main
  • Default setup is disabled, with no duplicate alerts
  • verify:action-pins passes, and the job declares timeout-minutes

Part of tracker #2543. Needs no credential; can start now.

Activity

  1. added this to the v2.10.0 milestone on Sep 30, 2026
  2. added
    v2Issues and PRs for v2
    choreMaintenance: deps, build tooling, CI, cleanup — no user-facing behavior change
    on Sep 30, 2026
  3. cliffhall commented on Sep 30, 2026

    @cliffhall
    MemberAuthor

    Triage: Priority Medium (total 8)

    Board: #28, Status Todo. Part of tracker #2543.

  4. modified the milestones: v2.10.0, v2.11.0, v2.12.0 on Oct 7, 2026
  5. self-assigned this
    on Oct 20, 2026
  6. cliffhall commented on Oct 20, 2026

    @cliffhall
    MemberAuthor

    Shipped in #2741 (merged to v2/main as fa11e43).

    • Code scanning now has analyses for refs/heads/v2/main (both /language:actions and /language:javascript-typescript on fa11e43) and for a PR targeting v2/main (refs/pull/2741/merge).
    • Default setup is disabled (not-configured). The new workflow uploads into the same two categories default setup used, so no parallel alert set exists, and there are 0 open alerts.
    • verify:action-pins passes. It now counts security-events: write as credentialed, so the pins are enforced. The job declares timeout-minutes: 10.

    main gets push and scheduled scans again once the v2.12.0 milestone merge carries the workflow there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

choreMaintenance: deps, build tooling, CI, cleanup — no user-facing behavior changev2Issues and PRs for v2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions