Skip to content

ci(security): stop declaring advanced CodeQL; default setup owns it - #143

Merged
WomB0ComB0 merged 1 commit into
mainfrom
ci/stop-advanced-codeql-default-setup-collision
Sep 30, 2026
Merged

WomB0ComB0 merged 1 commit into
mainfrom
ci/stop-advanced-codeql-default-setup-collision

Conversation

@WomB0ComB0

@WomB0ComB0 WomB0ComB0 commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

What this does

Drops languages: from the security.yml call into the org reusable
security-scan.yml, so this repo stops declaring an advanced CodeQL
configuration. CodeQL coverage here continues, unchanged, via GitHub's
default setup.

What was actually happening

Code scanning rejected every upload the advanced job produced. From the
CodeQL job of run 36643939241:

Analysis upload status is failed.
CodeQL analyses from advanced configurations cannot be processed when the
default setup is enabled
CodeQL job status was configuration error.

This is not a guess about the config — it is the stored state. Every CodeQL
analysis stored on this repository carries default setup's analysis key:

analysis_key = dynamic/github-code-scanning/codeql:analyze

Not one carries a workflow's analysis_key — the advanced job has never landed
a result here. Check it for yourself with
GET /repos/resq-software/docs/code-scanning/analyses, grouped by
analysis_key.

SARIF upload works generally — the zizmor SARIF from these same workflow runs
uploads fine. It is CodeQL specifically that is refused, because
code-scanning/default-setup on this repo reports state: configured, with
query suite extended.

Why it reported green

The org reusable carries, on the Analyze step:

continue-on-error: true   # default-setup collision otherwise fails

and the ##[error] is emitted by that Analyze step itself, in its main
phase
— which is exactly what continue-on-error: true on that step
swallows. Had the rejection genuinely been post-job, a continue-on-error on
the step could not have masked it. The ordering is visible in the run log
linked above: the ##[error] sits inside the Analyze step's own output,
ahead of the first Post job cleanup. line. Only the trailing CodeQL job status was ... line is printed after the step, by init-post, and a passing
run prints it too, reading was success.

Positive control: on resq-software/programs, where default setup is off, the
same reusable logs Analysis upload status is complete. and CodeQL job status was success., with no ##[error] anywhere in the Analyze step.

The Analyze step's own API conclusion still reads success. A permanent
configuration error was rendered as a permanent green check for scanning that
never landed.

Coverage is not reduced

Default setup runs the extended query suite. The reusable's CodeQL job
passes no queries:, packs: or config-file to codeql-action/init, so it
ran the default suite — a subset of extended. The discarded work was also
the narrower work. This PR removes waste and a false signal; it does not remove
scanning.

Why omitting the input is safe

The reusable gates the job on the input being non-empty:

  codeql:
    if: ${{ inputs.languages != '' && inputs.languages != '[]' }}

languages defaults to "[]", so omitting it makes the job skip, not
fail. Confirmed on this PR's own checks below rather than assumed.

Scope / blast radius

  • security.yml was the only CodeQL declaration in this repo — no
    codeql.yml, no codeql-languages: passed to the org required.yml, and no
    github/codeql-action/init anywhere else under .github/.
  • No CodeQL job is a required status check. The default-branch-baseline
    ruleset requires only the required context.
  • No org or repo setting is changed by this PR. Default setup stays exactly
    as it is.
  • Positive control for the whole diagnosis: resq-software/crates has default
    setup off, and its advanced CodeQL job reports Analysis upload status is complete and stores analyses under its own workflow's analysis_key.
    crates and programs are deliberately untouched — their workflows are the
    real coverage there.

Follow-up (separate PR, deliberately after this one)

Once this collision is gone across the affected repos, the
continue-on-error: true should come off the reusable's Analyze step so a
real CodeQL failure fails loudly again. Ordering matters: removing it first
would convert a silent failure into a hard failure on every affected repo at
once. Mitigating but not sufficient — every consumer pins the reusable by SHA
and that repo has no tags, so a change there reaches nobody until they re-pin.

Test plan

  • security workflow runs on this PR
  • the reusable's CodeQL (...) job(s) report skipped, not failed
  • no check on this PR fails
  • code scanning alerts on this repo are unaffected (default setup keeps running)

Summary by CodeRabbit

  • Chores
    • Updated security scanning configuration so CodeQL scanning is handled by GitHub’s default setup rather than the reusable security-scan workflow.
    • The reusable workflow now skips its CodeQL job when no language selection is provided.

The reusable security-scan's CodeQL job ran on every push, PR and weekly
schedule, and every upload it produced was refused by code scanning:

  Analysis upload status is failed.
  CodeQL analyses from advanced configurations cannot be processed when
  the default setup is enabled
  CodeQL job status was configuration error.

It still reported green, because the reusable carries continue-on-error
on the Analyze step and the rejection is emitted in the post-job phase.

Coverage is unchanged. Default setup runs the extended query suite,
which is broader than the default suite this workflow used.

Omitting `languages:` leaves the reusable's '[]' default, and its
`if: inputs.languages != '' && inputs.languages != '[]'` gate skips the
job rather than failing it.
@github-actions github-actions Bot added the area:ci GitHub Actions, workflows, CI label Sep 30, 2026
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 6ff7612c-0b6e-4362-98ca-c6c7bdc7f0c8

📥 Commits

Reviewing files that changed from the base of the PR and between fb4853a and 95a41ed.

📒 Files selected for processing (1)
  • .github/workflows/security.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The security workflow no longer passes an explicit language list to the reusable security-scan workflow. Comments describe the empty-list default and note that GitHub default setup continues code scanning.

Changes

Security scan configuration

Layer / File(s) Summary
Reusable workflow language input
.github/workflows/security.yml
The scan job omits the explicit actions language selection. Comments describe the reusable workflow’s empty-list default and GitHub default setup’s scanning role.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 95a41

The reusable CodeQL job is skipped, with coverage intended to come from GitHub default setup. This checkout cannot confirm that setting, but no code-scanning gap is established by the available evidence.

Architecture Summary

Architecture risk: 🔵 Low · up to 95a41

The changed surface does not map to a changed system, dependency edge, entrypoint, or external dependency.

Changed systems: None identified.

Architecture concerns
No architecture-level concerns identified.

Review details

Before / after behavior

  • observed — Modified behavior in .github/workflows/security.yml: Removed the explicit actions language selection from the reusable workflow inputs. The comments describe that omission as using the reusable workflow’s empty-list default, which skips its CodeQL job, while GitHub default setup continues scanning.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: removing the advanced CodeQL declaration so GitHub default setup owns CodeQL scanning.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@WomB0ComB0

Copy link
Copy Markdown
Member Author

Verified on this PR's own checks

check source result
scan / CodeQL (${{ matrix.language }}) the reusable's advanced job skipped
CodeQL GitHub code scanning default setup success

The reusable's if: inputs.languages != '' && inputs.languages != '[]' gate
skips the job rather than failing it, as predicted — the job is completed/skipped
with no matrix expansion. And CodeQL still ran on this PR, from default setup.

So: the discarded advanced analysis is gone, and CodeQL scanning is not.

@WomB0ComB0
WomB0ComB0 merged commit a39c6e1 into main Sep 30, 2026
23 checks passed
@WomB0ComB0
WomB0ComB0 deleted the ci/stop-advanced-codeql-default-setup-collision branch September 30, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci GitHub Actions, workflows, CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant