Skip to content

fix(ci): resolve zizmor and actionlint findings in workflows - #470

Open
cbrgm wants to merge 3 commits into
mainfrom
fix/workflow-lint-findings
Open

fix(ci): resolve zizmor and actionlint findings in workflows#470
cbrgm wants to merge 3 commits into
mainfrom
fix/workflow-lint-findings

Conversation

@cbrgm

@cbrgm cbrgm commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

What

Fixes everything zizmor and actionlint flag in .github/workflows/:

  • template-injection in docker.yaml, docs-release.yaml, helm-publish.yaml -> expressions moved into env:
  • security-events: write in osv-scanner.yml moved from workflow level down to the two scan jobs
  • shellcheck SC2086 / SC2193 across docker.yaml, helm-publish.yaml, release.yaml, test-e2e.yaml

Why

The interesting one is docs-release.yaml, it interpolated ${{ github.event.release.tag_name }} right into a mike deploy line, and that job runs with contents: write and persist-credentials: true. A tag name is attacker-shaped input, so it stays a value in env: now, not shell code.

helm-publish.yaml had a real bug next to the lint noise: [[ "${{ github.ref }}" == refs/tags/* ]] (SC2193). The expression is substituted before bash sees it, so the comparison was not doing what it looks like. Reads $GITHUB_REF now.

The osv-scanner change is just scoping, both jobs still get the same permissions, they are only granted per job instead of file-wide.

Two zizmor findings are intentionally left:

  • cache-poisoning on docker/setup-buildx-action (low confidence) -> gha cache is wanted here, dropping it costs real build time
  • superfluous-actions on softprops/action-gh-release -> swapping a pinned action for a hand-rolled gh release script in the signing job is a bigger change than a lint PR should carry. Happy to do it separately if we want it 🤷

Testing

Both linters clean except the two above:

$ actionlint
$ echo $?
0

$ zizmor --no-online-audits .github/workflows/
47 findings (45 suppressed): 1 informational, 0 low, 0 medium, 1 high

Before: 61 findings (51 suppressed, 7 unsafe fixes): 5 informational, 0 low, 1 medium, 4 high plus 11 actionlint/shellcheck findings.

No behavior change intended, every edit is value-identical. Publish paths (docker sign, helm push, docs deploy, release) only run on tag/release, so they get their real test on the next release.

Checklist

  • Tests added/updated (n/a, CI config only)
  • No breaking changes
  • Readable commit history
  • AI code review considered and comments resolved

Summary by CodeRabbit

  • Chores
    • Improved release, documentation, container, Helm, security scanning, and end-to-end test automation workflows.
    • Improved handling of tags, versions, image references, repository details, and commit information.
    • Strengthened workflow permission scoping for security scans.
    • Improved reliability when processing values containing spaces or special characters.

cbrgm added 3 commits August 25, 2026 11:08
zizmor flags template-injection where `${{ ... }}` is interpolated
straight into a shell script. Bind them to env vars instead so the
values never become shell code.

Also fixes the shellcheck findings in the same blocks: unquoted
$GITHUB_OUTPUT / $GITHUB_ENV, an unquoted glob in `ls`, and SC2193 on
the `[[ "${{ github.ref }}" == refs/tags/* ]]` comparison, which now
reads $GITHUB_REF directly.
`security-events: write` sat at workflow level, so every job in the
file inherited it. Move it plus `actions: read` down to the two scan
jobs, workflow level keeps `contents: read`.
SC2086, no behavior change. Guards against word splitting if a version
or image tag ever contains whitespace.
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 89a41b61-d134-4ab4-a5e4-a1b70fd8b266

📥 Commits

Reviewing files that changed from the base of the PR and between 7ea9746 and f2f1700.

📒 Files selected for processing (6)
  • .github/workflows/docker.yaml
  • .github/workflows/docs-release.yaml
  • .github/workflows/helm-publish.yaml
  • .github/workflows/osv-scanner.yml
  • .github/workflows/release.yaml
  • .github/workflows/test-e2e.yaml

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


📝 Walkthrough

Walkthrough

The pull request updates six GitHub Actions workflows. The changes move workflow expressions into environment variables, quote shell expansions and output paths, and scope OSV Scanner permissions to its jobs.

Changes

Workflow hardening

Layer / File(s) Summary
Workflow value handling
.github/workflows/docker.yaml, .github/workflows/docs-release.yaml, .github/workflows/release.yaml, .github/workflows/test-e2e.yaml
Docker signing and tag extraction use environment variables. Docs deployment and E2E arguments use quoted shell variables. Release output writes use a quoted path.
Helm publication inputs
.github/workflows/helm-publish.yaml
Helm version extraction, chart updates, publishing, and signing use environment variables for workflow values and output paths.
OSV Scanner job permissions
.github/workflows/osv-scanner.yml
The workflow retains contents: read at top level and assigns scan permissions to both scanner jobs.

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

Merge Risk: ⚪ Minimal · up to f2f17

This workflow-only change is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

Suggested reviewers: rebellieous

🚥 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 The description clearly explains what changed, why the changes were needed, and how the workflows were tested. The checklist is complete. The issue reference and reviewer notes are omitted, but neithe…
Title check ✅ Passed The title clearly and concisely identifies the main change: resolving CI workflow findings from zizmor and actionlint.
Full details: Docstring Coverage

Explanation

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 files. (6 skipped: 6 unsupported.)

Full details: Description check

Explanation

The description clearly explains what changed, why the changes were needed, and how the workflows were tested. The checklist is complete. The issue reference and reviewer notes are omitted, but neither omission prevents the description from being mostly complete.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/workflow-lint-findings

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants