jazzband / jazzband/help

RFC: Adopt new security model for publishing

Open
#364 14 comments 9 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
28
Forks
6
PR merge metrics
No merged PRs in 30d

Description

## Proposal

Hey all! After speaking with @jezdez at PyCon US 2024 we discussed the current security model and we wanted to reimagine it using some new features that GitHub and PyPI provide. Specifically using GitHub Actions, protected by CODEOWNERS, gated on GitHub Environment reviews from team leads and then uploading directly to PyPI using Trusted Publishers.

Given recent history, there are valid concerns of malicious commits making their way into releases. My current thinking on this is to optimize for visibility of the content in GitHub (avoiding binary artifacts) and to have a plan for how team leads or admins can step in if something happens. We also want to formalize a process (and make it easy!) for team leads to review changes between a known good version and a new proposed release if that's not already happening uniformly.

## Proposed adoption plan

Since this is a pretty substantive change we wouldn't want to roll this out without making sure it works as expected. My thinking is we'd copy an existing repository, make changes there, test it out, and then after we're satisfied move to a single real project, and then work on wider rollout (potentially with automation).

I am available to help figuring out the initial configuration (and perhaps would need additional privileges on this repository to do so) and can do some poking around with what projects are doing today to see how tough adopting Trusted Publishers might be. I can also help out with some of the manual aspects like adding Trusted Publishers and fanning out PRs to projects. Projects that have specific situations will need to provide some feedback on how their current processes can be accommodated.

For consistency and to facilitate future upgrades to the process I recommend standardizing on the names of release workflows definitions, GitHub teams and GitHub Environments (bikeshed values of: `release.yml` `(project)-team-leads`, and `release`).

Let me know if there are concerns with this proposal, I am happy to change it to fit project expectations!

### Tasks
- [ ] https://github.com/jazzband/help/issues/367

Contributor guide

Open the contributing guide

Research direction

No files or tests are identified; start by reviewing the linked task #367 and the repository's current publishing workflows. Define a tested adoption path using GitHub Actions, CODEOWNERS, Environment reviews, and Trusted Publishers, with a pilot project and standardized release workflow, team, and Environment names as the completion criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, github-actions
Domain
ci-cd, release, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.