Skip to content

Drop GitHub token permissions on deploy jobs#2007

Merged
umputun merged 1 commit intomasterfrom
harden-deploy-permissions
Feb 22, 2026
Merged

Drop GitHub token permissions on deploy jobs#2007
umputun merged 1 commit intomasterfrom
harden-deploy-permissions

Conversation

@paskal
Copy link
Collaborator

@paskal paskal commented Feb 21, 2026

Summary

  • Add explicit permissions: {} to deploy jobs in docker.yml and ci-site.yml
  • These jobs only curl an external updater URL and need no GitHub API access
  • Without an explicit block they inherit the workflow default, which may include contents:write, packages:write, etc. — far more than needed
  • Limits the blast radius if a deploy job is ever compromised

Inspired by https://adnanthekhan.com/posts/clinejection/

@paskal paskal requested a review from umputun as a code owner February 21, 2026 23:37
Deploy jobs only curl an external updater URL and need no GitHub API
access. Without an explicit permissions block they inherit the workflow
default, which may include contents:write, packages:write, etc.
Setting permissions to {} limits the blast radius if a job is
compromised.
@paskal paskal force-pushed the harden-deploy-permissions branch from 2f42d6c to 3046da5 Compare February 21, 2026 23:38
Copy link
Owner

@umputun umputun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thx. good hardening

@umputun umputun merged commit 0105bc2 into master Feb 22, 2026
4 checks passed
@umputun umputun deleted the harden-deploy-permissions branch February 22, 2026 02:16
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