scverse / scverse/squidpy

Consider switching to TrustedPublishing for PyPI uploads

Open
#927 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
598
Forks
121
Avg merge
3d 11h
Merged PRs (30d)
3

Description

Squidpy still uses PyPI tokens for uploading releases

https://github.com/scverse/squidpy/blob/7d3761f58de6729e4e2dff4ffdc650e64f0f2111/.github/workflows/deployment.yml#L36-L42

Consider switching to trusted publishing which is nowadays the recommended way to connect to PyPI

This confers significant usability and security advantages when compared to PyPI's traditional authentication methods:

Usability: with trusted publishing, users no longer need to manually create API tokens on PyPI and copy-paste them into their CI provider. The only manual step is configuring the publisher on PyPI.
Security: PyPI's normal API tokens are long-lived, meaning that an attacker who compromises a package's release token can use it until its legitimate user notices and manually revokes it. Trusted publishing avoids this problem because the tokens minted expire automatically.

For an example, see our cookiecutter.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with .github/workflows/deployment.yml at lines 36-42, then read the linked PyPI trusted publishers documentation and the cookiecutter-scverse release workflow. Configure the PyPI publisher and update the release workflow so uploads use trusted publishing instead of PyPI tokens; done means the release upload completes without the existing token.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python
Domain
ci-cd, release, security
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.