Skip to content

fix(pypi): keep upload token out of argv - #985

Open
WNZhao wants to merge 1 commit into
profullstack:masterfrom
WNZhao:fix/pypi-token-env
Open

fix(pypi): keep upload token out of argv#985
WNZhao wants to merge 1 commit into
profullstack:masterfrom
WNZhao:fix/pypi-token-env

Conversation

@WNZhao

@WNZhao WNZhao commented Aug 24, 2026

Copy link
Copy Markdown

Summary

  • authenticate Twine through its supported TWINE_USERNAME and TWINE_PASSWORD environment variables
  • stop putting the PyPI API token in process arguments
  • add a regression test asserting the secret is absent from argv

Twine documents environment variables as its CI-friendly credential mechanism. Keeping the token out of argv avoids exposure through process inspection and captured command errors.

Verification

  • pnpm exec vitest run packages/targets/sdk-pypi/src/index.test.ts (2/2)
  • pnpm --filter @profullstack/sh1pt-target-sdk-pypi typecheck
  • git diff --check

expect(args).not.toContain('--password');
expect(options.env).toMatchObject({
TWINE_USERNAME: '__token__',
TWINE_PASSWORD: 'pypi-secret-token',
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