ci: prune stale and redundant workflows - #2982
Conversation
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
💤 Files with no reviewable changes (1)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughGitHub Actions automation is updated for CodeQL, Scorecard, and release notes, and SECURITY.md now documents the security scanning setup and reporting behavior. ChangesWorkflow security and release automation updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/update-releasenotes.yaml:
- Around line 7-13: The paths filter in the update-releasenotes workflow is too
broad and matches all files under docs/changelogs/** instead of only release
changelog files. Change the paths filter from matching 'docs/changelogs/**' to
specifically match 'docs/changelogs/v*.md' to ensure the workflow only triggers
when actual release changelog files (following the v*.md naming pattern
mentioned in the comment) are modified, preventing unnecessary workflow runs on
unrelated file edits in that directory.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c5e7333a-2f90-42f2-a7b3-c8b27558d608
📒 Files selected for processing (4)
.github/workflows/codeql.yml.github/workflows/retest.yaml.github/workflows/scorecard.yml.github/workflows/update-releasenotes.yaml
💤 Files with no reviewable changes (2)
- .github/workflows/retest.yaml
- .github/workflows/codeql.yml
Aleksei Sviridkin (lexfrei)
left a comment
There was a problem hiding this comment.
LGTM
Business context: prunes four CI workflows that are broken, redundant, or noisier than needed — removes the never-working /retest workflow and narrows the triggers on CodeQL, Scorecard, and release-notes sync.
I verified that none of the affected workflows is a merge dependency:
- The only required status checks on
mainarepre-commitandE2E Tests; none of the four touched workflows contributes a required check, so none of these changes can block merges. Evidence: branch protectionrequired_status_checks.contexts=["pre-commit","E2E Tests"]. - No
workflow_runtrigger references any of these workflows, no reusable-workflowuses:points at the four files, and no README badge references them. Evidence:grep -rn 'workflow_run' .github/workflows/,grep -rn 'uses:.*workflows/' .github/workflows/, and the README grep all return nothing. retest.yamlis genuinely dead: it reran a job namedPrepare environment, but that is now a step inside theE2E Testsjob rather than a standalone job, so the job lookup always fails. The only/retestmention outside the deleted file is an immutable historical changelog entry. Evidence:pull-requests.yaml:260- name: Prepare environmentis a step under jobE2E Tests(pull-requests.yaml:191);docs/changelogs/v0.40.0.md:149.
No blockers.
Non-blocking:
-
The description's run-history figures are imprecise. The workflow has 9 real (
/retest) invocations, all failed, dating back to 2026-01-08 — not "two". The "0 successful runs" statement is also literally contradicted by the API, which reports 41successruns; those areissue_commentevents where the job-levelifguard was false, which GitHub records assuccesswith no steps executed. The conclusion (never completed a real retest, safe to remove) holds; only the stated numbers are off. Evidence:actions/workflows/retest.yaml/runs?status=failuretotal_count=9;?status=successruns returnsteps: []. -
Dropping the
pull_requesttrigger from CodeQL shifts SAST from pre-merge to post-merge: a vulnerability introduced in a PR is now caught only after it lands onmain(push) or at the weekly cron, not on the PR itself. Defensible given the zero-alert history and the autobuild network-fetch flake vector, but it is a detection-timing trade-off, not a pure no-op. Evidence:codeql.ymlon:retainspush: [main]plus the weeklyschedule, withpull_requestremoved. -
update-releasenotes.yamlloses its only fallback path. Previously anymainpush re-ran the sync, so a release whose changelog had already merged would still be picked up by a later unrelated push; now onlydocs/changelogs/**pushes trigger it, and there is noworkflow_dispatch. If a release body ends up out of sync, recovery requires touching a changelog file. Consider addingworkflow_dispatch:as a manual re-sync hatch. Evidence:update-releasenotes.yamlon:has only the path-gatedpush, noworkflow_dispatch.
VerdictLGTM with nits. The four workflow changes are technically sound and the substantive arguments (retest is broken, CodeQL produces nothing on PRs, scorecard floods code-scanning, update-releasenotes wastes self-hosted runs) all hold. None of the changes break a required status check or any documented contributor workflow. Two factual claims in the PR body / commit messages are overstated relative to current API data — please correct them before merge so the rationale matches reality. Findingsnit | PR body claim "0 successful runs in entire recorded history" (retest workflow) is overstated
Actual telemetry over the full visible history of
The substantive point is intact: since the TIA / job-split refactor of nit | "168 open scorecard alerts" is overstated and the same number is baked into a code comment
Actual code-scanning alert telemetry today (
The narrative ("Scorecard floods code-scanning, CodeQL has zero first-party findings to bury") is correct. But the specific number is off by ~74 and is now embedded as a maintenance hazard inside the workflow comment: # .github/workflows/scorecard.yml:41-45
# SARIF is kept as a downloadable artifact only. It is intentionally NOT
# uploaded to GitHub code-scanning: Scorecard posts one alert per check,
# which floods the Security > Code scanning dashboard (168 alerts) and
# buries CodeQL's first-party findings. The public scorecard.dev badge
# (publish_results above) is the canonical view of these results.Either drop the specific count from the comment (the qualitative argument is enough), or update it to the real number. Hardcoded counts in source code go stale immediately and a future reader who runs the API query will distrust the comment. What I verified
Caveats / non-applicable
|
c143eb2
945dcd0 to
c143eb2
Compare
Aleksei Sviridkin (lexfrei)
left a comment
There was a problem hiding this comment.
LGTM — four CI workflow changes are sound; none touches a required status check, and the nits below are non-blocking.
Business context: prunes four CI workflows that are broken, redundant, or noisier than needed — removes the never-working /retest workflow and narrows the triggers on CodeQL, Scorecard, and release-notes sync.
What I verified:
retest.yamlis genuinely dead. It reran a job namedPrepare environment, but that is now a step inside theE2E Testsjob (pull-requests.yaml:269under the job at:200), so the workflow'sjobs.find(j => j.name === 'Prepare environment')lookup can never match.gh run reruncovers the need. No live docs reference/retest— only a historical changelog entry.- No merge gate is affected. The required status checks on
mainarepre-commitandE2E Tests; none of the four touched workflows contributes either context, so dropping CodeQL's per-PR run / Scorecard's push trigger cannot block a merge. scorecard.yml: removingsecurity-events: writeis safe — once theupload-sarifstep is gone, no remaining step under the analysis job needs that scope;publish_results: truekeeps the public scorecard.dev viewer populated.
Non-blocking follow-ups:
-
"0 successful runs in its entire recorded history" (PR body + the
ci: remove broken retest workflowcommit message) is overstated. The API records 41successruns forretest.yaml— these areissue_commentevents where the job-levelifguard was false, which GitHub records assuccesswith no steps executed. The conclusion (never completed a real retest since the TIA refactor, safe to delete) holds; only the absolute claim is wrong. Since it lives in a permanent commit message, consider rewording to "no successful retest since the TIA refactor; every real/retestinvocation since has failed withCould not find Prepare environment job." -
scorecard.ymlbakes "168 alerts" into a source comment. Hardcoded counts rot immediately — the live count already differs from this figure — and a future reader who runs the API query will distrust the comment. The qualitative argument (Scorecard floods code-scanning and buries CodeQL's findings) stands on its own; drop the specific number or there is now a magic constant to maintain. -
The
paths: docs/changelogs/**filter is slightly broader than the stated intent.docs/changelogs/also holdstemplate.mdandpatch-template.md, so an edit to either still fires the self-hosted job;docs/changelogs/v*.mdmatches only the release changelogs the comment describes. Practical impact is small (templates rarely change), so this is optional. -
Dropping CodeQL's
pull_requesttrigger shifts SAST from pre-merge to post-merge — a vulnerability introduced in a PR is now caught only after it lands onmainor at the weekly cron, not on the PR itself. Defensible given the zero-alert history and the autobuild network-fetch flake vector, but it is a detection-timing trade-off rather than a pure no-op, worth naming in the rationale. -
update-releasenotes.yamlloses its only fallback path. Previously anymainpush re-ran the sync; now onlydocs/changelogs/**pushes do, and there is noworkflow_dispatch. If a release body ends up out of sync, recovery requires touching a changelog file. Consider addingworkflow_dispatch:as a manual re-sync hatch.
The release body is synced from docs/changelogs/v*.md. That file lands on main only when the changelog PR (tags.yaml generate-changelog) merges, or when a maintainer edits an existing changelog. Path-gate the push trigger to docs/changelogs/v*.md (the v* glob skips template.md / patch-template.md in the same directory) so the self-hosted job stops firing on every unrelated main push and scanning the latest 30 releases for nothing. Also add a workflow_dispatch trigger as a manual re-sync hatch, so a release body that drifts out of sync can be re-synced without touching a changelog file. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
CodeQL's Go autobuild runs `make` from the repo root, whose included hack/common-envs.mk does a `$(shell git fetch upstream --tags)` at parse time — a network call to a non-origin remote that has nothing to do with the analysis and is a flake vector. Switch to build-mode: manual and compile each first-party module explicitly (the root module, api/apps/v1alpha1, and the three nested image modules); the _repos/* upstream clones are gitignored and absent on a clean checkout, so they drop out for free. Same coverage, no upstream fetch. Keeping the pull_request trigger is deliberate. Per-PR analysis is the only mode that diffs newly introduced alerts against the base branch and annotates them on the changed lines — the basis for promoting CodeQL to a required pre-merge check. No paths filter: a required check that is path-skipped is reported as never-arriving and would block PRs that touch no Go. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
Scorecard posts one code-scanning alert per check, which floods Security > Code scanning and buries CodeQL's first-party findings. The public scorecard.dev badge (publish_results) is the canonical view, so drop the upload-sarif step and the now-unneeded security-events: write. Also drop the push:[main] trigger — the weekly cron and branch_protection_rule already cover it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
The /retest command re-ran a job named 'Prepare environment', but the TIA/job-split refactor of pull-requests.yaml collapsed that into a step inside the E2E Tests job, so the job lookup can never match. Every real /retest invocation since fails with 'Could not find Prepare environment job' — 10 failed runs spanning 2026-01-08 to 2026-06-24, none that ever completed a retest. (The 41 runs GitHub records as 'success' are issue_comment events where the job-level if-guard was false, so no steps ran.) `gh run rerun --failed` covers the need. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
b600323
c143eb2 to
b600323
Compare
|
Thanks Aleksei Sviridkin (@lexfrei) — all five addressed in the rewritten stack (now at
All five first-party Go modules were verified to build standalone with the pinned toolchain, so the manual build won't break the (intended) required check on a peripheral module. |
Record the repository's automated security analysis in SECURITY.md: CodeQL SAST (manual Go build, runs per-PR/push/weekly, new-alert-on-diff, intended as a required pre-merge check, dismiss-with-reason for false positives) and OpenSSF Scorecard (supply-chain posture, published to the scorecard.dev badge, intentionally not uploaded to code scanning). Mirrors the workflow changes in this PR so the security posture is documented, not just encoded in YAML. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request streamlines the repository's CI/CD infrastructure by pruning stale workflows and refining existing security scanning configurations. The changes aim to reduce CI noise, improve the reliability of security analysis, and provide better documentation for the project's security posture. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the SECURITY.md file to include a detailed section on automated security analysis, explaining the usage of CodeQL and OpenSSF Scorecard. The review feedback suggests formatting the long paragraphs in the list items using semantic line wraps to improve readability and make future git diffs cleaner, along with a minor grammatical correction.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| - **CodeQL** (static analysis). Runs on every pull request to `main`, on push to `main`, and on a weekly schedule. The Go database is built with CodeQL's `manual` build mode — each first-party module is compiled explicitly, so the analysis does not depend on the project `Makefile` (which fetches upstream tags) and stays reproducible. On a pull request CodeQL reports only alerts that are *new relative to `main`* and annotates them on the changed lines. New findings are expected to be resolved before merge — either by fixing the code, or, for a false positive or accepted risk, by dismissing the alert in the **Security → Code scanning** tab with a recorded reason (`False positive`, `Won't fix`, or `Used in tests`). | ||
| - **OpenSSF Scorecard** (supply-chain posture). Runs weekly and on branch-protection changes, and publishes results to the public Scorecard API at <https://scorecard.dev/viewer/?uri=github.com/cozystack/cozystack>. Scorecard results are intentionally **not** uploaded to GitHub code scanning: it posts one alert per check, which would bury CodeQL's first-party findings. The scorecard.dev badge is the canonical view. |
There was a problem hiding this comment.
The paragraphs in these list items are very long (over 400-600 characters). Breaking them into semantic line wraps (one sentence per line) improves readability in raw text editors and makes future git diffs much cleaner. Additionally, adding a comma after "On a pull request" improves grammatical flow.
| - **CodeQL** (static analysis). Runs on every pull request to `main`, on push to `main`, and on a weekly schedule. The Go database is built with CodeQL's `manual` build mode — each first-party module is compiled explicitly, so the analysis does not depend on the project `Makefile` (which fetches upstream tags) and stays reproducible. On a pull request CodeQL reports only alerts that are *new relative to `main`* and annotates them on the changed lines. New findings are expected to be resolved before merge — either by fixing the code, or, for a false positive or accepted risk, by dismissing the alert in the **Security → Code scanning** tab with a recorded reason (`False positive`, `Won't fix`, or `Used in tests`). | |
| - **OpenSSF Scorecard** (supply-chain posture). Runs weekly and on branch-protection changes, and publishes results to the public Scorecard API at <https://scorecard.dev/viewer/?uri=github.com/cozystack/cozystack>. Scorecard results are intentionally **not** uploaded to GitHub code scanning: it posts one alert per check, which would bury CodeQL's first-party findings. The scorecard.dev badge is the canonical view. | |
| - **CodeQL** (static analysis). Runs on every pull request to `main`, on push to `main`, and on a weekly schedule. | |
| The Go database is built with CodeQL's `manual` build mode — each first-party module is compiled explicitly, so the analysis does not depend on the project `Makefile` (which fetches upstream tags) and stays reproducible. | |
| On a pull request, CodeQL reports only alerts that are *new relative to `main`* and annotates them on the changed lines. | |
| New findings are expected to be resolved before merge — either by fixing the code, or, for a false positive or accepted risk, by dismissing the alert in the **Security → Code scanning** tab with a recorded reason (`False positive`, `Won't fix`, or `Used in tests`). | |
| - **OpenSSF Scorecard** (supply-chain posture). Runs weekly and on branch-protection changes, and publishes results to the public Scorecard API at <https://scorecard.dev/viewer/?uri=github.com/cozystack/cozystack>. | |
| Scorecard results are intentionally **not** uploaded to GitHub code scanning: it posts one alert per check, which would bury CodeQL's first-party findings. | |
| The scorecard.dev badge is the canonical view. |
Aleksei Sviridkin (lexfrei)
left a comment
There was a problem hiding this comment.
LGTM — this addresses the pre-merge SAST follow-up cleanly.
CodeQL is back on pull_request (plus push: [main] and the weekly cron), so SAST runs before merge again rather than only post-merge. The Go analysis switched from autobuild to build-mode: manual with an explicit per-module build, and I verified the build step covers every first-party module — ., api/apps/v1alpha1, packages/apps/kubernetes/images/kubevirt-csi-driver, packages/system/dashboard/images/token-proxy, packages/system/kubeovn-webhook/images/kubeovn-webhook — which is exactly the set of go.mod files in the tree, so CodeQL gets a complete database with no silently-missed module, and without the make/autobuild upstream-fetch flake. set -euxo pipefail means a build failure fails the job, so the check is meaningful.
The other prunes are unchanged from before and remain sound (dead /retest removal, Scorecard SARIF-upload drop, releasenotes path filter), and the new SECURITY.md section documenting the CodeQL/Scorecard split is accurate.
Note (out of scope for this PR): making CodeQL actually block merges is a branch-protection change — the Analyze (go) check needs adding to the required status checks on main (currently pre-commit + E2E Tests), which is a repo-settings action separate from this PR. Worth doing only after this merges, so the check exists on the PR workflow before it's marked required.
Approving.
What this PR does
Cleans up four GitHub Actions workflows that are redundant, broken, or noisier than they need to be. Each change is its own commit so they can be reviewed (or reverted) independently.
retest.yaml— removed. The/retestcommand re-ran a job namedPrepare environment, but the TIA / job-split refactor ofpull-requests.yamlcollapsed that into a step inside theE2E Testsjob, so the job lookup can never match. Every real/retestinvocation since fails withCould not find "Prepare environment" job— 10 failed runs spanning 2026-01-08 → 2026-06-24, none that ever completed a retest. (The 41 runs GitHub records assuccessareissue_commentevents where the job-levelif-guard was false, so no steps ran.)gh run rerun --failedcovers the need.codeql.yml— switch Go to manual build; keep the per-PR run. The Goautobuildranmake, whose includedhack/common-envs.mkdoes a$(shell git fetch upstream --tags)at parse time — a network call to a non-origin remote that has nothing to do with the analysis and is a flake vector. Replace it withbuild-mode: manualthat compiles each first-party module explicitly (the root module,api/apps/v1alpha1, and the three nested image modules; the gitignored_repos/*upstream clones drop out for free on a clean checkout). Same coverage, no upstream fetch. Thepull_requesttrigger is kept on purpose: per-PR analysis is the only mode that diffs new alerts against the base branch and annotates them on the changed lines — the basis for promoting CodeQL to a required pre-merge check (follow-up: addCodeQL / Analyze (go)to branch protection and set the code-scanning failure threshold to errors-only). Nopathsfilter — a required check that is path-skipped never reports and would block PRs that touch no Go.scorecard.yml— badge-only; stop polluting code-scanning. Scorecard uploads one code-scanning alert per check, which floods Security → Code scanning and buries CodeQL's first-party findings. Drop theupload-sarifstep and the now-unneededsecurity-events: write; keeppublish_results(the public scorecard.dev badge is the canonical view). Also drop the redundantpush:[main]trigger — the weekly cron +branch_protection_rulealready cover it.update-releasenotes.yaml— path-gate to changelog changes + manual hatch. The release body is synced fromdocs/changelogs/v*.md, which only lands on main when the changelog PR merges or a maintainer edits an existing changelog. Gate thepushtrigger todocs/changelogs/v*.md(thev*glob skipstemplate.md/patch-template.md) so the self-hosted job stops firing on every unrelated main push, and addworkflow_dispatchas a manual re-sync hatch.SECURITY.md— document the security scanners. Add an "Automated security analysis" subsection describing the CodeQL (SAST) and OpenSSF Scorecard (supply-chain) setup, including the manual Go build, the new-alert-on-diff behaviour, the intent to make CodeQL a required pre-merge check, and how findings are dismissed — so the posture is documented, not just encoded in YAML.Not touched:
release-e2e.yaml— already removed by #2978.Release note
Summary by CodeRabbit
Chores
Documentation