Repository navigation
chore(ci): harden workflow checkouts, timeouts and concurrency - #12
Merged
Merged
Conversation
zizmor reported 10 artipacked findings: no checkout set persist-credentials: false. Seven jobs had no timeout, so a hung job ran for six hours. The builds group keyed on the sha. A release on main's HEAD then shared a group with the push build, and one cancelled the other. PR runs now group on the PR number. Push and release builds group on event and ref and do not cancel a running build. dependency-scan adds the event to its key, because a schedule run and a push share a sha. Verify: zizmor . shows no medium findings, actionlint passes, and the kind e2e job still passes without persisted credentials. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> 🔒 Scanned for secrets using gitleaks 8.30.1
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the workflow-hardening changes.
No open issues 🎉
What changed in this PR
This PR hardens GitHub Actions workflows across the codebase by limiting checkout credential persistence, bounding job runtimes, and preventing unrelated runs from cancelling each other.
Changes:
- Disable credential persistence in all 10 checkout steps.
- Add explicit timeouts to seven jobs that previously had none.
- Use PR numbers for concurrency grouping and separate publishing and dependency-scan runs by event, preserving running push and release builds.
| File | Description |
|---|---|
.github/workflows/kubernetes.yml |
Disable checkout credential persistence and group PR runs by number. |
.github/workflows/harness.yml |
Add lint and test timeouts and disable checkout credential persistence. |
.github/workflows/docker-build-dockerhub.yml |
Add metadata, build, and manifest timeouts; disable checkout credential persistence. |
.github/workflows/dependency-scan.yml |
Separate concurrency groups by event and disable checkout credential persistence. |
.github/workflows/control-plane.yml |
Add a lint timeout, harden checkouts, and group PR runs by number. |
.github/workflows/cli.yml |
Disable checkout credential persistence and group PR runs by number. |
.github/workflows/chart.yml |
Disable checkout credential persistence and group PR runs by number. |
.github/workflows/builds.yml |
Separate publishing concurrency groups, preserve running builds, and harden version-check execution. |
Review effort: Balanced
itsmihir
approved these changes
Oct 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
actions/checkoutsetspersist-credentials: false(10 steps).timeout-minutes. The 7 jobs that had none get 5 to 30 minutes. On main the longest of them, the image build, takes 4 minutes.head_ref.builds.yml: push and release runs group on event and ref. They do not cancel a running build.dependency-scan.yml: the group key includes the event.Why
zizmor .reported 10 mediumartipackedfindings. A job with no timeout runs for up to six hours. Thebuilds.ymlgroup keyed on the sha, so a release on main's HEAD shared a group with the push build, and one cancelled the other. Themaintag could then stay stale. A weeklydependency-scanrun and a push at the same sha had the same collision.How to verify
zizmor .shows 0 medium findings (10 before). Two lowself-repositoryhints remain.actionlint .github/workflows/*.ymlshows only the two shellcheck notes that main already has.GITHUB_TOKENthroughenv, so it does not need the checkout credentials.Not covered
docker-build-dockerhub.yml:52)..pinact.yaml. Theself-repositoryhints stay.Linear: MAR-3258
🤖 Generated with Claude Code