-
Notifications
You must be signed in to change notification settings - Fork 3
chore: added permissions to workflows to least possible permission [SPA-3604][ACT-2077] #1390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: added permissions to workflows to least possible permission [SPA-3604][ACT-2077] #1390
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
…r into chore/SPA-3604-explicit-github-token-permissions
anwaar931
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Chaoste
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into this. The permissions look correct to me
| permissions: | ||
| contents: write # Checkout with full history | ||
| id-token: write # OIDC token for authentication | ||
| actions: read # Restore cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was under the assumption that a workflow inherits its permission from its parent. Since this one only has "contents: read" permission, is it possible to allow these jobs here to get more permissions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand it from the docs, the job elevates permissions relative to the workflow baseline, which wouldn’t normally be allowed. However, here it is allowed because it happens in the caller workflow (here /vercel.yaml), so it doesn’t increase permissions within the same workflow.
Purpose
More info on changes in doc: https://contentful.atlassian.net/wiki/spaces/SRT/blog/2025/12/01/6020300812/Securing+GitHub+actions+and+workflows+priority+for+public+repositories
Ticket: https://contentful.atlassian.net/browse/SPA-3604
https://contentful.atlassian.net/browse/ACT-2077