Skip to content

Resolve remaining zizmor code scanning alerts#28

Merged
dduugg merged 1 commit into
mainfrom
fix-code-scanning-alerts
Jul 25, 2026
Merged

Resolve remaining zizmor code scanning alerts#28
dduugg merged 1 commit into
mainfrom
fix-code-scanning-alerts

Conversation

@dduugg

@dduugg dduugg commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the 9 alerts open at https://github.com/rubyatscale/shared-config/security/code-scanning:

  • zizmor/ref-version-mismatch (8 alerts) across ci.yml, stale.yml, zizmor.yml: stale version comments on already-pinned SHAs. actions/checkout, ruby/setup-ruby, slackapi/slack-github-action, and actions/stale all use floating major tags (v6, v1, v3, v10) that move forward as new releases ship — a comment written when a SHA was "the current v6" goes stale once v6 moves on to a newer commit. Same class of issue already fixed in cd.yml by Fix broken gem releases: restore persisted checkout credentials in cd.yml #27. Updated each comment to the precise version currently tagged at that exact SHA (v7.0.0, v1.314.0, v3.0.3, v10.3.0) — the pinned SHAs themselves are unchanged, only the human-readable labels.
  • zizmor/artipacked (1 alert): codeql.yml's checkout step didn't set persist-credentials: false. Unlike cd.yml's deploy job (which needs the persisted credential for git push, per Fix broken gem releases: restore persisted checkout credentials in cd.yml #27), this job only reads the repo for CodeQL analysis and never pushes anything, so disabling persistence is the correct, safe default here — no exception needed.

Test plan

  • zizmor .github/workflows/ — 0 findings across every workflow in the repo, both offline and with --gh-token

Fixes the 9 open alerts at
https://github.com/rubyatscale/shared-config/security/code-scanning:

- zizmor/ref-version-mismatch (8 alerts): stale version comments on
  already-pinned SHAs across ci.yml, stale.yml, and zizmor.yml. Floating
  major tags (v6, v1, v3, v10) move forward as new releases ship, so a
  comment written when a SHA was "the current v6" goes stale once v6
  moves on. Same class of issue already fixed in cd.yml (#27). Updated
  each comment to the precise version currently tagged at that exact
  SHA (v7.0.0, v1.314.0, v3.0.3, v10.3.0 respectively) - the pinned
  SHAs themselves are unchanged.
- zizmor/artipacked (1 alert): codeql.yml's checkout step didn't set
  persist-credentials: false. Unlike cd.yml's deploy job, this one only
  reads the repo for analysis and never pushes, so disabling
  persistence is correct here (no exception needed).

Verified with `zizmor .github/workflows/`, both offline and
--gh-token: 0 findings across every workflow in the repo.
@dduugg
dduugg requested a review from a team as a code owner July 25, 2026 05:25
@github-project-automation github-project-automation Bot moved this to Triage in Modularity Jul 25, 2026
@dduugg
dduugg merged commit 472bcae into main Jul 25, 2026
4 checks passed
@dduugg
dduugg deleted the fix-code-scanning-alerts branch July 25, 2026 05:26
@github-project-automation github-project-automation Bot moved this from Triage to Done in Modularity Jul 25, 2026
dduugg added a commit that referenced this pull request Jul 25, 2026
Every consumer repo currently carries its own full copy of this file,
differing only in the language matrix (ruby-only, js/ts-only, rust-only,
or some mix, plus "actions" everywhere). That means fixes like the
stale-version-comment cleanup in #28 have to be repeated by hand across
~20 repos instead of landing once here, same as ci.yml/cd.yml/stale.yml/
triage.yml already solved for their own workflows.

Converts codeql.yml to workflow_call, taking the language list as a
JSON-array input (e.g. '["actions","ruby"]') instead of a hardcoded
matrix. build-mode is now unconditionally "none" for every language,
since that's what every current caller already used (GA since CodeQL
2.23.3, including for Rust/C++).

Since codeql.yml no longer has its own push/pull_request/schedule
triggers, shared-config would otherwise stop scanning its own
.github/workflows/ - added codeql-self-scan.yml to carry those triggers
and call the reusable workflow locally (`uses: ./.github/workflows/
codeql.yml`, not @main, so a PR that edits codeql.yml is tested against
its own in-PR version rather than whatever's already on main).

Verified with zizmor (offline + --gh-token) and actionlint: 0 findings
on both new/changed files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant