python / python/release-tools

Bug: release tooling should quote remote command arguments

Aperta
#397 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Python
Stelle
61
Fork
48
Merge medio
1h 22m
PR unite (30g)
4

Descrizione

run_release.py builds remote shell command strings for release publication.
Several values are interpolated directly into those command strings, including
release credential environment values, the release tag, and remote staging paths
derived from release-manager state.

Those values are normally trusted release-process inputs, but quoting them
consistently makes the generated commands safer and more predictable when a
value contains whitespace or shell metacharacters.

Reproducer

Using mocked Paramiko clients:

  1. Set the python.org API credential value to contain shell metacharacters, such
    as user:key; echo unexpected.
  2. Make the fake Sigstore issuer return a token containing shell metacharacters,
    such as token; touch /tmp/unexpected.
  3. Run the python.org upload step and capture the command sent to
    exec_command().
  4. The captured command includes those values unquoted in AUTH_INFO=... and
    SIGSTORE_IDENTITY_TOKEN=... assignments.

Similar mocked tests can set the release-manager SSH username to a value with a
metacharacter and observe that derived staging paths are inserted into cleanup,
copy, unzip, move, group, and permission commands without quoting.

Expected behavior

Release-tool commands should quote environment values, release arguments, and
remote filesystem paths before sending command strings to the remote shell,
while preserving intentional glob expansion for staged artifact copies.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia da run_release.py e analizza la costruzione dei comandi per l’upload su python.org e i percorsi SSH di release-manager. Usa client Paramiko simulati per acquisire l’output di exec_command() con metacaratteri nelle credenziali, nei token, nei nomi utente e nei percorsi di staging; il lavoro è completato quando tali valori vengono quotati in modo sicuro, mentre l’espansione intenzionale dei glob per le copie degli artefatti preparati rimane intatta.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
release
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Specificata chiaramente
Idoneità per principianti
68/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.