Skip to content

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

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 36614661532:

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/dev/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 the security scanning workflow to use the shared configuration’s default language and query settings. No user-facing changes.

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.
@WomB0ComB0
WomB0ComB0 requested a review from a team as a code owner September 30, 2026 13:35
@github-actions github-actions Bot added size/S PR size: small (10-29 lines changed) C-Chore Chore: deps, tooling, or config with no public API change A-DevOps CI, workflows, actions, and repo infra (.github) labels 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: e4d23922-3b75-4701-835e-7955e8cdb1fa

📥 Commits

Reviewing files that changed from the base of the PR and between 3875863 and 0866d51.

📒 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 description now identifies the file as a thin caller of the organization-wide reusable workflow. The workflow no longer sets the languages input, leaving the reusable workflow’s default in effect.

Changes

Security workflow configuration

Layer / File(s) Summary
Reusable workflow defaults
.github/workflows/security.yml
The description identifies the workflow as a thin caller. The languages input was removed, and comments describe the default configuration and extended query suite.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Suggested reviewers: resq-sw

Merge Risk: 🟡 Moderate · up to 0866d

The reusable CodeQL job will be skipped. Confirm that GitHub default setup is enabled before merging to ensure CodeQL coverage continues.

Architecture Summary

Architecture risk: 🔵 Low · up to 0866d

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: The workflow description now identifies this file as a thin caller of the organization-wide reusable workflow; the previous description directed maintainers to update the languages list.
  • observed — Modified behavior in .github/workflows/security.yml: The languages: '["actions"]' input was removed. Comments explain that omitting it leaves the reusable workflow’s [] default and describe GitHub’s default setup as running the extended query suite.
🚥 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 default setup remains responsible for analysis.
✨ 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.

@github-actions

Copy link
Copy Markdown
Contributor

This change correctly addresses a configuration issue with the CodeQL security scan. By removing the languages input, it prevents a collision with GitHubs default CodeQL setup, resolving the analysis upload failures. The change is well-explained and improves the reliability of the security workflow. No security vulnerabilities, logic bugs, or performance issues were found. The audit has passed.

Generated by ai-auditor for #95 · gem25pro · 20.9 AIC · ⌖ 1.2 AIC · ⊞ 12.7K · ◷

@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.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
get-resq-software 0866d51 Sep 30 2026, 01:35 PM

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

Labels

A-DevOps CI, workflows, actions, and repo infra (.github) C-Chore Chore: deps, tooling, or config with no public API change size/S PR size: small (10-29 lines changed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants