Skip to content

ci: prune stale and redundant workflows - #2982

Merged
myasnikovdaniil merged 5 commits into
mainfrom
ci/prune-stale-workflows
Jun 26, 2026
Merged

ci: prune stale and redundant workflows#2982
myasnikovdaniil merged 5 commits into
mainfrom
ci/prune-stale-workflows

Conversation

@myasnikovdaniil

@myasnikovdaniil myasnikovdaniil commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

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 /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" job10 failed runs spanning 2026-01-08 → 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.

  • codeql.yml — switch Go to manual build; keep the per-PR run. The Go autobuild ran make, 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. Replace it with build-mode: manual that 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. The pull_request trigger 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: add CodeQL / Analyze (go) to branch protection and set the code-scanning failure threshold to errors-only). No paths filter — 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 the upload-sarif step and the now-unneeded security-events: write; keep publish_results (the public scorecard.dev badge is the canonical view). Also drop the redundant push:[main] trigger — the weekly cron + branch_protection_rule already cover it.

  • update-releasenotes.yaml — path-gate to changelog changes + manual hatch. The release body is synced from docs/changelogs/v*.md, which only lands on main when the changelog PR merges or a maintainer edits an existing changelog. Gate the push trigger to docs/changelogs/v*.md (the v* glob skips template.md / patch-template.md) so the self-hosted job stops firing on every unrelated main push, and add workflow_dispatch as 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

NONE

Summary by CodeRabbit

  • Chores

    • Updated automation workflows for security checks and release-note generation.
    • Removed an unused retry workflow and tightened when some checks run.
  • Documentation

    • Expanded security guidance to better explain automated analysis, alert handling, and reporting.
    • Clarified when release notes updates are generated.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@github-actions github-actions Bot added size/L This PR changes 100-499 lines, ignoring generated files area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review labels Jun 22, 2026
@dosubot dosubot Bot added area/ci Issues or PRs related to CI workflows, GitHub Actions, automation kind/cleanup Categorizes issue or PR as related to cleanup of code, process, or technical debt labels Jun 22, 2026
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c0572314-dc81-4565-815b-3c1030af9332

📥 Commits

Reviewing files that changed from the base of the PR and between c143eb2 and fad0a3a.

📒 Files selected for processing (5)
  • .github/workflows/codeql.yml
  • .github/workflows/retest.yaml
  • .github/workflows/scorecard.yml
  • .github/workflows/update-releasenotes.yaml
  • SECURITY.md
💤 Files with no reviewable changes (1)
  • .github/workflows/retest.yaml
✅ Files skipped from review due to trivial changes (1)
  • SECURITY.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/update-releasenotes.yaml
  • .github/workflows/scorecard.yml

📝 Walkthrough

Walkthrough

GitHub Actions automation is updated for CodeQL, Scorecard, and release notes, and SECURITY.md now documents the security scanning setup and reporting behavior.

Changes

Workflow security and release automation updates

Layer / File(s) Summary
CodeQL Go manual build
.github/workflows/codeql.yml
The CodeQL workflow updates its upload-results comment, switches Go analysis from autobuild to manual build mode, and adds a conditional step that builds selected Go modules with go build ./....
Scorecard trigger and SARIF handling
.github/workflows/scorecard.yml
The Scorecard workflow stops on pushes to main, drops security-events: write, and keeps SARIF as an artifact instead of uploading it to GitHub code scanning.
Release-notes path filter
.github/workflows/update-releasenotes.yaml
The release-notes workflow adds a paths filter so push runs on main only when docs/changelogs/v*.md changes.
Security documentation update
SECURITY.md
SECURITY.md adds CodeQL to the automation bullet list and introduces an automated security analysis subsection describing CodeQL and OpenSSF Scorecard behavior.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

Suggested labels

security

Suggested reviewers

  • IvanHunters
  • lexfrei
  • kvaps
  • sircthulhu

Poem

🐇 I hopped through workflows, neat and bright,
CodeQL builds by day, Scorecard trims by night.
Changelog paths now guide the notes,
And security lore in markdown floats.
A tidy burrow, calm and tame —
The rabbit nods and signs the frame.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the PR’s main theme of cleaning up stale and redundant CI workflows.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/prune-stale-workflows

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.

@myasnikovdaniil myasnikovdaniil removed the area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review label Jun 22, 2026
@github-actions github-actions Bot added the area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review label Jun 22, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 77d42ab and 945dcd0.

📒 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

Comment thread .github/workflows/update-releasenotes.yaml Outdated
@myasnikovdaniil myasnikovdaniil self-assigned this Jun 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 main are pre-commit and E2E Tests; none of the four touched workflows contributes a required check, so none of these changes can block merges. Evidence: branch protection required_status_checks.contexts = ["pre-commit","E2E Tests"].
  • No workflow_run trigger references any of these workflows, no reusable-workflow uses: 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.yaml is genuinely dead: it reran a job named Prepare environment, but that is now a step inside the E2E Tests job rather than a standalone job, so the job lookup always fails. The only /retest mention outside the deleted file is an immutable historical changelog entry. Evidence: pull-requests.yaml:260 - name: Prepare environment is a step under job E2E Tests (pull-requests.yaml:191); docs/changelogs/v0.40.0.md:149.

No blockers.

Non-blocking:

  1. 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 41 success runs; those are issue_comment events where the job-level if guard was false, which GitHub records as success with 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=failure total_count=9; ?status=success runs return steps: [].

  2. Dropping the pull_request trigger from CodeQL shifts SAST from pre-merge to post-merge: a vulnerability introduced in a PR is now caught only after it lands on main (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.yml on: retains push: [main] plus the weekly schedule, with pull_request removed.

  3. update-releasenotes.yaml loses its only fallback path. Previously any main push re-ran the sync, so a release whose changelog had already merged would still be picked up by a later unrelated push; now only docs/changelogs/** pushes trigger it, and there is no workflow_dispatch. If a release body ends up out of sync, recovery requires touching a changelog file. Consider adding workflow_dispatch: as a manual re-sync hatch. Evidence: update-releasenotes.yaml on: has only the path-gated push, no workflow_dispatch.

@IvanHunters

Copy link
Copy Markdown
Collaborator

Verdict

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

Findings

nit | PR body claim "0 successful runs in entire recorded history" (retest workflow) is overstated

PR body, retest bullet and commit 945dcd09 message.

Actual telemetry over the full visible history of .github/workflows/retest.yaml:

  • 2232 total runs (skipped: 2182, success: 41, failure: 9).
  • All 41 successes are from 2026-01-06 .. 2026-01-22 (pre-TIA refactor window).
  • All but one of the failures (8 of 9) are from 2026-01-08 onwards and consistent with the Could not find "Prepare environment" job error cited in the body.

The substantive point is intact: since the TIA / job-split refactor of pull-requests.yaml, the workflow has been useless. But the absolute "0 successful runs in its entire recorded history" claim is wrong. Suggest rewording to e.g. "No successful runs since the TIA refactor in early 2026; every real /retest invocation since then has failed with Could not find Prepare environment job."

nit | "168 open scorecard alerts" is overstated and the same number is baked into a code comment

PR body, scorecard bullet, commit 49646365 message, and .github/workflows/scorecard.yml:43.

Actual code-scanning alert telemetry today (gh api repos/cozystack/cozystack/code-scanning/alerts --paginate):

  • Scorecard alerts: 183 total (94 open, 89 fixed).
  • CodeQL alerts: 0 in any state.

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

  • All four workflow YAML changes parse cleanly and the remaining triggers/permissions are internally consistent.
  • scorecard.yml: removing security-events: write is correct — no step under the analysis job needs it after upload-sarif/codeql-action is removed. publish_results: true keeps the scorecard.dev viewer populated. branch_protection_rule + weekly cron remain valid triggers.
  • codeql.yml: dropping the pull_request trigger does not break a required status check — the repo has no branch protection rules and no rulesets with required status check contexts. Push-to-main + weekly schedule still cover all shipped code.
  • update-releasenotes.yaml: the paths: docs/changelogs/** filter matches the only path that tags.yaml generate-changelog writes (docs/changelogs/v${VERSION}.md). Squash-merging the changelog PR brings exactly that path onto main.
  • /retest has no live documentation — only one historical mention in docs/changelogs/v0.40.0.md:149. No PR template, CONTRIBUTING.md, AGENTS.md, or docs/agents/* reference it.
  • README has no Scorecard badge that would break from dropping upload-sarif.
  • Adjacent push-on-main workflows (build-main.yaml, labels.yaml) already use paths/paths-ignore filters; tags.yaml and release-e2e.yaml fire on tags only.
  • PR body has a release-note fenced block (NONE), Conventional Commits scopes are correct, commits are --signoff'd.

Caveats / non-applicable

  • Upgrade & Fresh-Install Impact: N/A — this PR only touches .github/workflows/; no packages/, charts, CRDs, RBAC, migrations, or image references are affected.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yaml is genuinely dead. It reran a job named Prepare environment, but that is now a step inside the E2E Tests job (pull-requests.yaml:269 under the job at :200), so the workflow's jobs.find(j => j.name === 'Prepare environment') lookup can never match. gh run rerun covers the need. No live docs reference /retest — only a historical changelog entry.
  • No merge gate is affected. The required status checks on main are pre-commit and E2E 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: removing security-events: write is safe — once the upload-sarif step is gone, no remaining step under the analysis job needs that scope; publish_results: true keeps the public scorecard.dev viewer populated.

Non-blocking follow-ups:

  1. "0 successful runs in its entire recorded history" (PR body + the ci: remove broken retest workflow commit message) is overstated. The API records 41 success runs for retest.yaml — these are issue_comment events where the job-level if guard was false, which GitHub records as success with 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 /retest invocation since has failed with Could not find Prepare environment job."

  2. scorecard.yml bakes "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.

  3. The paths: docs/changelogs/** filter is slightly broader than the stated intent. docs/changelogs/ also holds template.md and patch-template.md, so an edit to either still fires the self-hosted job; docs/changelogs/v*.md matches only the release changelogs the comment describes. Practical impact is small (templates rarely change), so this is optional.

  4. Dropping CodeQL's pull_request trigger shifts SAST from pre-merge to post-merge — a vulnerability introduced in a PR is now caught only after it lands on main 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 rather than a pure no-op, worth naming in the rationale.

  5. update-releasenotes.yaml loses its only fallback path. Previously any main push re-ran the sync; now only docs/changelogs/** pushes do, and there is no workflow_dispatch. If a release body ends up out of sync, recovery requires touching a changelog file. Consider adding workflow_dispatch: as a manual re-sync hatch.

@myasnikovdaniil
myasnikovdaniil marked this pull request as draft June 25, 2026 12:54
myasnikovdaniil and others added 4 commits June 26, 2026 18:11
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>
@myasnikovdaniil

Copy link
Copy Markdown
Contributor Author

Thanks Aleksei Sviridkin (@lexfrei) — all five addressed in the rewritten stack (now at b600323df):

  1. retest telemetry. Reworded the commit + PR body with the real numbers: every real /retest invocation failed — 10 failed runs spanning 2026-01-08 → 2026-06-24, none that ever completed a retest. The 41 success runs are issue_comment events where the job-level if-guard was false (no steps ran), now called out explicitly instead of the wrong "0 successful runs" claim.

  2. scorecard 168 magic number. Dropped the count from the source comment (and the commit body) — kept the qualitative argument only.

  3. docs/changelogs/** too broad. Narrowed to docs/changelogs/v*.md, so template.md / patch-template.md no longer trigger the sync.

  4. CodeQL pre→post-merge trade-off. Rather than accept the detection-timing regression, I reversed the change — the pull_request trigger stays. Instead the flake itself is fixed: autobuild (which ran make$(shell git fetch upstream --tags) at parse time) is replaced with build-mode: manual that compiles each first-party module explicitly (root, api/apps/v1alpha1, and the 3 nested image modules; the gitignored _repos/* clones drop out on a clean checkout). Same coverage, no upstream fetch, per-PR SAST retained. Intended follow-up (repo-admin): add Analyze (go) to branch protection + set the code-scanning failure threshold to errors-only, promoting it to a real pre-merge gate. Deliberately no paths filter — a path-skipped required check never reports and would block Go-less PRs.

  5. update-releasenotes fallback. Added workflow_dispatch: as a manual re-sync hatch.

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>
@myasnikovdaniil
myasnikovdaniil marked this pull request as ready for review June 26, 2026 14:55
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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

  • Workflow Cleanup: Removed the redundant retest.yaml workflow and optimized codeql.yml, scorecard.yml, and update-releasenotes.yaml to reduce noise and improve reliability.
  • CodeQL Optimization: Switched CodeQL to manual Go build mode to avoid unnecessary network calls and ensure consistent, reproducible analysis.
  • Documentation: Updated SECURITY.md to include a new section detailing the automated security analysis setup, including CodeQL and OpenSSF Scorecard practices.
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
  • Ignored by pattern: .github/workflows/** (4)
    • .github/workflows/codeql.yml
    • .github/workflows/retest.yaml
    • .github/workflows/scorecard.yml
    • .github/workflows/update-releasenotes.yaml
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment Gemini (@gemini-code-assist) Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread SECURITY.md
Comment on lines +87 to +88
- **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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

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.

Suggested change
- **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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@myasnikovdaniil
myasnikovdaniil merged commit ee54a6e into main Jun 26, 2026
13 checks passed
@myasnikovdaniil
myasnikovdaniil deleted the ci/prune-stale-workflows branch June 26, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci Issues or PRs related to CI workflows, GitHub Actions, automation area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review kind/cleanup Categorizes issue or PR as related to cleanup of code, process, or technical debt size/L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants