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

feature request: Use "Safe API Token" for Packagist Githooks #7806

Open
bshaffer opened this issue Nov 5, 2024 · 0 comments
Open

feature request: Use "Safe API Token" for Packagist Githooks #7806

bshaffer opened this issue Nov 5, 2024 · 0 comments

Comments

@bshaffer
Copy link
Contributor

bshaffer commented Nov 5, 2024

Packagist now has two types of tokens - the API Token, and the "Safe" API Token. This is because the standard API token can be used to create packages (which we currently use it for), which if compromised, could result in a supply-chain attack. However the "Safe" API token can only be used to update existing packages, and if an attacker gets ahold of it, it would not expose a large threat vector.

In order to take advantage of these finer-grained token permissions, we can add a PACKAGIST_SAFE_TOKEN env var to our repository creation job, and when set, uses this token to configure the new package repository git hooks.

We would also want to add a new --packagist-safe-token option to the SplitCommand console command.

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

No branches or pull requests

1 participant