Skip to content

Avoid printing sensitive store auth URLs - #8427

Open
dengjeffrey wants to merge 1 commit into
mainfrom
redact-store-auth-manual-url
Open

Avoid printing sensitive store auth URLs#8427
dengjeffrey wants to merge 1 commit into
mainfrom
redact-store-auth-manual-url

Conversation

@dengjeffrey

@dengjeffrey dengjeffrey commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Prevent Shopify CLI from printing manual store authorization URLs that the caller has marked as sensitive.

Context

The Stripe-backed store:stripe-auth flow passes the signup JWT through the OAuth authorization URL as the signup query parameter.

The normal path opens that URL in the browser and does not print it. If the browser cannot be opened automatically, the fallback path previously printed the full manual URL to the terminal. That could expose the signup JWT in shell history, logs, screenshots, or CI output.

Implementation

  • Adds a sensitive option to the manual auth URL presenter API.
  • Marks the manual auth URL as sensitive at the call site when the store auth input includes signup.
  • Suppresses the manual URL output when sensitive is true and shows safer guidance instead.

This keeps the sensitivity decision at the point where we know why the URL is sensitive, rather than having the presenter parse and infer sensitive query parameters after the fact.

Testing

pnpm vitest packages/store/src/cli/services/store/auth/result.test.ts packages/store/src/cli/services/store/auth/index.test.ts packages/store/src/cli/commands/store/stripe-auth.test.ts --run

@github-actions github-actions Bot added the Area: @shopify/cli @shopify/cli package issues label Aug 28, 2026
@dengjeffrey
dengjeffrey force-pushed the redact-store-auth-manual-url branch from b7184a6 to d555d4c Compare August 28, 2026 20:57
@dengjeffrey
dengjeffrey marked this pull request as ready for review August 28, 2026 21:41
@dengjeffrey
dengjeffrey requested a review from a team as a code owner August 28, 2026 21:41
@dengjeffrey
dengjeffrey force-pushed the redact-store-auth-manual-url branch from d555d4c to 1ea45d4 Compare August 28, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/cli @shopify/cli package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant