Skip to content

ci: fix zizmor policy failures - #657

Merged
Bowei Du (bowei) merged 2 commits into
agent-substrate:mainfrom
BenTheElder:ci-pin-actions
Jul 31, 2026
Merged

Bowei Du (bowei) merged 2 commits into
agent-substrate:mainfrom
BenTheElder:ci-pin-actions

Conversation

@BenTheElder

@BenTheElder Benjamin Elder (BenTheElder) commented Jul 31, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes new org-imposed requirement to pin workflow actions and to explicitly mark workflows as read only. We should've been doing this anyhow. Dependabot even knows how to bump in this format.

The org's zizmor scan audits every workflow file a PR touches, and
unpinned-uses is one of its mandatory checks: a mutable tag like @v5 can be
repointed at any commit, so the pin has to be a hash. The tags these were on
are kept as comments.
The scan's other blocking finding on this file: with no permissions block a
job gets the repository's default token scopes, which for these jobs is more
than they use.
@BenTheElder Benjamin Elder (BenTheElder) changed the title ci: pin the workflow's actions to commit hashes ci: fix zizmor policy failures Jul 31, 2026
@bowei
Bowei Du (bowei) merged commit 7147463 into agent-substrate:main Jul 31, 2026
11 checks passed
@BenTheElder
Benjamin Elder (BenTheElder) deleted the ci-pin-actions branch July 31, 2026 03:35
Sanskar Singh Bhardwaj (sanskar-singh-2403) added a commit to sanskar-singh-2403/substrate that referenced this pull request Aug 6, 2026
agent-substrate#657 already pinned the actions in pr-workflow.yaml and scoped the token
to contents: read, so this trims to just the zizmor findings that landing
did not cover.

- govulncheck.yaml: pin golang/govulncheck-action@v1 to
  032d45514ae346b1db93c04b0c90b841c370344f (v1.1.0), the only remaining
  unpinned-uses finding.
- pr-workflow.yaml: fix template-injection. Move
  ${{ matrix.ateapi-client-auth }} (Install / Deploy micro-VM steps) and
  ${{ needs.e2e-test-matrix.result }} (Check E2E matrix step) into env:
  vars and reference them as quoted shell variables so the expansion
  cannot inject code.

Verified with zizmor v1.29.0: zero unpinned-uses and zero
template-injection findings on both workflows. No functional change.
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