Skip to content

Remove global sudo from action wrapper#42

Merged
crohr merged 1 commit into
mainfrom
fix/remove-action-global-sudo
Jul 1, 2026
Merged

Remove global sudo from action wrapper#42
crohr merged 1 commit into
mainfrom
fix/remove-action-global-sudo

Conversation

@crohr

@crohr crohr commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • run the Linux action wrapper binary as the normal runner user instead of via sudo -E
  • keep privileged CloudWatch agent operations behind their existing targeted sudo calls in the Go code
  • leave the magic-cache workflow matrix unchanged until Ubuntu 26 images are available

Why

Ubuntu 26 ignores sudo -E, which strips GitHub Actions cache/artifact environment variables before the action binary reads them. That prevents the RunsOn cache proxy from receiving the original ZCTIONS_* URLs and ACTIONS_RUNTIME_TOKEN, which breaks artifact upload through the local proxy.

The cache configuration path only sends an HTTP request to the local cache daemon and does not need root. Running the wrapper binary as the runner user preserves the GitHub Actions environment normally and avoids forwarding secrets through sudo.

Validation

  • make js
  • go test ./...
  • confirmed generated index.js and post.js no longer contain the sudo -n -E wrapper

@crohr crohr merged commit 5b40c57 into main Jul 1, 2026
19 checks passed
@crohr crohr deleted the fix/remove-action-global-sudo branch July 1, 2026 10:01
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.

1 participant