Skip to content
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

Add scoped tokens #171

Closed

Conversation

rvermeulen
Copy link

@rvermeulen rvermeulen commented Sep 13, 2024

This PR introduces scoped tokens that allow you to reduce the scope of a token generated by a GitHub App

This has a few benefits such as making explicit what scopes you want to use and reduce the impact if a token leaks (when its scope is reduced).

It doesn't protect against malicious code that receives the token in the same workflow, because that code can directly access the private key used to generate the code.

Perhaps an additional explicit revoking Action could be useful here where a scoped token is generated by a job associated with an environment that has access to the private key, passes that token to a job that uses it and that job revokes the token after use using that revoking Action.

@rvermeulen rvermeulen marked this pull request as ready for review September 13, 2024 16:57
@rvermeulen rvermeulen requested review from gr2m, parkerbxyz and a team as code owners September 13, 2024 16:57
Copy link
Contributor

@gr2m gr2m left a comment

Choose a reason for hiding this comment

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

please see #3, this is not the way we want to implement this feature. We started work towards what we want to do at #168

@rvermeulen rvermeulen closed this Sep 17, 2024
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