From 6b494709442c3a2f699b1d73240ef936236c9f9d Mon Sep 17 00:00:00 2001 From: Manush Murali Date: Thu, 12 Nov 2026 11:55:39 -0800 Subject: [PATCH] Run CodeQL on the release branch The Java, Python and Rust legs only ran for main. The 2.0 release is cut from v2-candidate, so its pushes and pull requests were never scanned. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Manush Murali --- .github/workflows/codeql.yml | 4 ++-- tests/test_codeql_java.py | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 599a801d3..49cf5cefd 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -24,9 +24,9 @@ name: CodeQL on: push: - branches: [main] + branches: [main, v2-candidate] pull_request: - branches: [main] + branches: [main, v2-candidate] schedule: # Monday, off the hour: scheduled runs queue behind everyone else's at the # boundary, and GitHub drops them under load. diff --git a/tests/test_codeql_java.py b/tests/test_codeql_java.py index ea87e5e98..61c71429a 100644 --- a/tests/test_codeql_java.py +++ b/tests/test_codeql_java.py @@ -98,3 +98,12 @@ def test_java_build_is_traced_before_analysis_and_checked_after() -> None: == "matrix.language == 'java-kotlin'" ) assert job['permissions']['security-events'] == 'write' + + +def test_release_branch_is_scanned() -> None: + workflow = yaml.load( + (ROOT / '.github/workflows/codeql.yml').read_text(), + Loader=yaml.BaseLoader, + ) + for event in ('push', 'pull_request'): + assert workflow['on'][event]['branches'] == ['main', 'v2-candidate']