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 layer of security to conda and pip uploading #17

Merged
merged 3 commits into from
Feb 21, 2024

Conversation

brynpickering
Copy link
Collaborator

Adding a few more gates to publishing packages on public indexes:

  1. Move github secrets to environments. These can have many more security checks associated with them, namely requiring a fixed set of individuals to manually approve a workflow run when it is triggered. This mitigates bad actors opening pull requests that leverage the upload tokens for PyPI / anaconda.
  2. Triple check that the pip package being uploaded will successfully install. Although we already have the test-pypi check, I recently discovered that if you upload to test-pypi and then find out something is wrong, you can't scrub test-PyPI of that version. This means you effectively have to bump the version number even though you haven't actually uploaded to PyPI yet.

I realise package uploading is small fry at the moment, with only PAM making use of it. However, as we open up more packages and clean up existing open ones, there will be more of our work being published to package indexes (indices?).

Copy link
Contributor

@mfitz mfitz left a comment

Choose a reason for hiding this comment

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

👍

@brynpickering
Copy link
Collaborator Author

Pre-release and release successful in a boilerplate repo.

@brynpickering brynpickering merged commit ff44a58 into main Feb 21, 2024
1 check passed
@brynpickering brynpickering deleted the increase-upload-security branch February 21, 2024 13:11
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