-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
To use ACTIONS_RUNTIME_TOKEN for writing into Package Registry #29398
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
Comments
Pulling the code from the Repository is a read permission of Code, it's not a write permission. I don't think the logic is reasonable. |
I think that end user should be able to make this decision. Because hardcoding or mocking some dummy user looks even less reasonable. |
This is screenshot from GitHub page and looks like they agreed with that. |
GitLab as well propose as option to use ${CI_JOB_TOKEN} to access to Maven Package Registry. |
I assume This token were never usable for this task on GitHub Actions. I propose to edit your proposal to mention If you really use the env |
@ChristopherHX As I see it, ACTIONS_RUNTIME_TOKEN regenerates each time on job starts execution. It looks much more secure instead of any hard coded value. No sense to store and remember this at all. The problem is that ACTIONS_RUNTIME_TOKEN don't have access to Package Registry to write. |
Yes on the current release, no for the upcoming release. actions/upload-artifact@v4 need a jwt and not the PAT format used before. I changed that
env:
MY_RUNTIME_TOKEN: ${{ github.token }} The tokens I mentioned are the exact same as of Gitea 1.21 Starting |
@ChristopherHX No problem, I understood your explanation about ACTIONS_RUNTIME_TOKEN. It's fine to switch to use ${env.GITHUB_TOKEN}. It could be any dynamically generated value with package write access. Approach with hard coded token looks ugly and this is the main reason why I reported this issue. |
I agree, this would be really nice and remove the need for PATs. The way Gitlab does it is quite neat IMHO :) |
I also think it would be a great feature :) |
It seems that for each project (many many projects), we now need to create unique dummy user and two tokens for it:
This results in the creation of a large number of extra users, which will interfere with regular users using the interfaces, as they cannot be hidden. Consequently, the system will have hundreds of dummy users. Creating just a few and grant access to multiple repositories is not correct from a security standpoint. Additionally, we need to remember their passwords to log in and generate tokens. Perhaps a good solution would be an ability to create tokens for projects rather than users. This way, there would be no extra users in the system. Or provide the ability to restrict a user-generated token to a specific project. This way, tokens for CI/CD can be created under one's own account without worrying that a leak would give an attacker access to all projects. |
Feature Description
Because ACTIONS_RUNTIME_TOKEN could be used to pull the code from Repository, it looks obvious to use this token later to write build result into Package Registry.
Screenshots
No response
The text was updated successfully, but these errors were encountered: