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 trusted-publish #89

Conversation

gaborbernat
Copy link
Member

@gaborbernat gaborbernat force-pushed the all-repos_autofix_trusted-publish-2023-04-26 branch from c3fe8ff to bcc400e Compare April 27, 2023 00:34
@gaborbernat gaborbernat merged commit 44bca99 into tox-dev:main Apr 27, 2023
9 checks passed
@gaborbernat gaborbernat deleted the all-repos_autofix_trusted-publish-2023-04-26 branch April 27, 2023 00:40
with:
fetch-depth: 0
- name: Build package
run: pyproject-build -s -w . -o dist
Copy link

Choose a reason for hiding this comment

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

@gaborbernat FYI this place is an attack surface targeting OIDC as it can potentially be used to reach other things than PyPI. The attack vector is the build deps poisoning, followed by the privilege elevation. This is why I always recommend building in a separate job that does not have access to OIDC.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't see how that helps. The token is scoped to this project only. If the user has hijacked the build chain, they cannot upload a new package themselves, however a package upload will happen anyway as part of the release pipeline, so they can just alter the build output and, in essence, upload whatever they want.

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.

None yet

2 participants