Skip to content

One-time secrets print bare: the sensitive mask is removed - #243

Merged
wmadden-electric merged 3 commits into
mainfrom
claude/prisma-postgres-redaction-c703fd
Aug 26, 2026
Merged

One-time secrets print bare: the sensitive mask is removed#243
wmadden-electric merged 3 commits into
mainfrom
claude/prisma-postgres-redaction-c703fd

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Fixes the bug Nurul reported: prisma postgres create provisions the database but the connection string is unreadable.

The bug

Interactively, the one-time connection URL appeared nowhere. Two rulings composed badly:

  1. The human card masked any sensitive: true value as ******** (Port init, delete the Commander shell: the CLI runs entirely on the engine #139).
  2. Since One visual system for the CLI: engine-rendered help, renderer-owned output conventions #172, the bare stdout mirror is skipped when stdout and stderr render to the same terminal, to avoid visible duplication.

Both conditions hold in a plain terminal, so the card said "The connection URL below is shown once, so save it now" above a row of asterisks, and the bare value was never written. Because the URL is one-time, it was unrecoverable. postgres connection create, postgres connection rotate, and bucket key create had the same hole.

The fix

Operator ruling (2026-08-26): the human card is where its owner reads a secret the command exists to hand over, so it prints bare. The mask never did useful work — before #172 the bare value printed to the same screen two lines below it.

  • The CLI's secret-printing commands (secretBlocks, bucket key create) stop passing sensitive: true, so the card shows the real value.
  • The engine is untouched and stays at 0.3.0: published @prisma/composer-cli and @prisma/orm-toolchain peer on the exact engine version, so removing the now-unused sensitive field from the engine's block type has to ride the next coordinated engine release.
  • The stdout mirror rules and --json are unchanged: pipes and redirection still receive exactly the clean data lines.
  • The golden byte pins now assert the bare values and document why the card carries the secret.
  • docs/product/output-conventions.md and docs/product/cli-style-guide.md state the new convention: a secret the command exists to hand over prints bare, once; scrubbing applies to logs, errors, telemetry, and previews.

Follow-up for the next engine release: delete the sensitive field from the engine's block type and renderer — no producer uses it any more.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 6 minutes.

View limit details

Limit details: You’ve used the included review currently available.

This review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0e1d50ab-429a-4261-8dcd-b687b53e36c0

📥 Commits

Reviewing files that changed from the base of the PR and between 41b16cc and fc2520c.

📒 Files selected for processing (7)
  • docs/product/cli-style-guide.md
  • docs/product/output-conventions.md
  • packages/cli/src/commands/bucket/key-create.ts
  • packages/cli/src/commands/postgres/presentation.ts
  • packages/cli/tests/bucket.test.ts
  • packages/cli/tests/golden-rendering.test.ts
  • packages/cli/tests/postgres.test.ts

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Aug 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

npx https://pkg.pr.new/@prisma/cli@243
npx https://pkg.pr.new/@prisma/cli-engine@243

commit: fc2520c

wmadden-electric and others added 2 commits August 26, 2026 15:34
Interactively, prisma postgres create showed its one-time connection URL nowhere: the human card masked it as ******** (sensitive: true), and since #172 the bare stdout mirror is skipped when stdout and stderr share a screen. The two rulings composed into a secret with no output path. Same hole in postgres connection create/rotate and bucket key create.

Operator ruling (2026-08-26): the human card is where its owner reads a secret the command exists to hand over, so it prints bare. The sensitive flag is removed from the block type, the renderer, and both producers; the stdout mirror rules and --json are unchanged, so pipes still receive the clean data lines. Golden pins and the output-convention docs are updated to match.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Dropping the block type's sensitive field is the pre-1.0 breaking bump.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@wmadden-electric
wmadden-electric force-pushed the claude/prisma-postgres-redaction-c703fd branch from ca56bbc to cd5f921 Compare August 26, 2026 13:35
Published composer-cli and orm-toolchain peer on the exact engine version, so any engine bump fails tarball conformance until the products re-release against it. The engine keeps its sensitive field, unused; the CLI's own commands stop passing it, which is what fixes the bug. Deleting the dead flag rides the next engine release.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@wmadden-electric
wmadden-electric merged commit 0b72f04 into main Aug 26, 2026
15 checks passed
@wmadden-electric
wmadden-electric deleted the claude/prisma-postgres-redaction-c703fd branch August 26, 2026 13:48
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