python / python/release-tools

Bug: release tooling should quote remote command arguments

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

Nobody has claimed this yet.

Dominant language
Python
Stars
61
Forks
48
Avg merge
1h 22m
Merged PRs (30d)
4

Description

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.

Contributor guide

No contributing guide indexed for this repository

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 run_release.py and inspect command construction for the python.org upload and release-manager SSH paths. Use mocked Paramiko clients to capture exec_command() output with metacharacters in credentials, tokens, usernames, and staging paths; done means those values are safely quoted while intentional glob expansion for staged artifact copies remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
release
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.