-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Add configurable permissions for Actions job tokens #36452
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
base: main
Are you sure you want to change the base?
Conversation
| @@ -0,0 +1,253 @@ | |||
| # Actions Token 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.
the docs hase been moved to https://gitea.com/gitea/docs
|
Thanks for the heads up @a1012112796! I understand the docs have been moved to https://gitea.com/gitea/docs. I'll:
Will update shortly! |
|
Update: I've removed the documentation file from this PR branch. ✅ Completed:
📝 Next Steps: This PR is now ready for review with just the code changes! |
✅ Documentation Migration CompleteI've handled the documentation migration as requested by @a1012112796. What I Did:
Status:✅ This PR is now ready for review - contains only code changes and implementation notes The PR now has 8 files (down from 9) with only the implementation code. |
Description
Implements configurable permissions for Actions job tokens as proposed in #24635.
This PR adds support for:
permissions:keyword (GitHub Actions compatible)permissions:overrideChanges
Database
action_token_permissions- Stores default permission configurationsaction_task- Addedtoken_scopesfield for calculated permissionsCore Features
Permission Configuration (
models/actions/token_permissions.go)Workflow Parser (
modules/actions/permissions.go)permissions:from workflow YAMLread-all,write-all,{}) and map formatsToken Scope Calculation (
models/actions/task.go)REST API (
routers/api/v1/repo/actions_permissions.go)GET /repos/{owner}/{repo}/actions/permissionsPUT /repos/{owner}/{repo}/actions/permissionsDocumentation
docs/content/usage/actions-token-permissions.en-us.md)IMPLEMENTATION_NOTES.md)Examples
Workflow with Permissions
Job-Level Override
API Usage
Compatibility
permissions:syntaxSecurity
Testing
Checklist
Related Issues
Closes #24635
Future Enhancements
Note: This is a comprehensive implementation that provides the foundation for configurable Actions token permissions. The syntax is fully compatible with GitHub Actions, making migration seamless for users.