Skip to content

ci: follow workflow best practices with scoped permissions and pinned sha versions - #65

Merged
zimeg merged 2 commits into
mainfrom
clack-zizmor-harden
Aug 27, 2026
Merged

ci: follow workflow best practices with scoped permissions and pinned sha versions#65
zimeg merged 2 commits into
mainfrom
clack-zizmor-harden

Conversation

@zimeg

@zimeg zimeg commented Aug 27, 2026

Copy link
Copy Markdown
Member

Summary

Hardens the Test workflow against the findings from zizmor (GitHub Actions security linter, v1.29.0):

  • Pin actions to full-length commit SHAs (2x High unpinned-uses) — actions were referenced by floating tag; now pinned to the exact commit the tag points to, with the version as a trailing comment:
    • actions/checkout3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
    • actions/setup-javadd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
  • Least-privilege permissions (Medium excessive-permissions) — added a top-level permissions: contents: read block. This test workflow only checks out code and runs tests, so read is sufficient.
  • persist-credentials: false on checkout (Low artipacked) — prevents the checkout token from persisting into the runner where it could leak via artifacts.

No version upgrades — each action stays on its currently-referenced major, just pinned. dependencies.yml was already clean (pinned + scoped) and is untouched.

Testing

zizmor --offline .github/workflows, before → after:

  • Before: 10 findings (6 suppressed): 0 informational, 1 low, 1 medium, 2 high
  • After: No findings to report. Good job! (5 suppressed)

All 4 targeted findings resolved.

Address zizmor findings in the Test workflow:
- Pin actions to full-length commit SHAs (2x High unpinned-uses)
- Add least-privilege top-level permissions: contents: read (Medium)
- Set persist-credentials: false on checkout (Low artipacked)

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg zimeg added the update PR only - an update or maintenance is being made to an existing app label Aug 27, 2026
@zimeg zimeg self-assigned this Aug 27, 2026
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg zimeg changed the title ci: harden workflows — pin actions to SHAs, scope permissions ci: follow workflow best practices with scoped permissions and pinned sha versions Aug 27, 2026
@zimeg
zimeg marked this pull request as ready for review August 27, 2026 08:19
@zimeg
zimeg requested a review from a team as a code owner August 27, 2026 08:19
@zimeg
zimeg merged commit 0c3bcc0 into main Aug 27, 2026
4 checks passed
@zimeg
zimeg deleted the clack-zizmor-harden branch August 27, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

update PR only - an update or maintenance is being made to an existing app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant