Skip to content

fix: redact sensitive values in dry-run output - #167

Merged
penalosa merged 9 commits into
mainfrom
investigate/issue-103
Oct 5, 2026
Merged

penalosa merged 9 commits into
mainfrom
investigate/issue-103

Conversation

@penalosa

@penalosa penalosa commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Redact request body fields marked sensitive by Forge/OpenAPI in generated --dry-run output, including nested values and JSON loaded with --body @file.
  • Use a plain <redacted> marker. Redaction applies only to the printed preview; the live request body is unchanged.
  • Keep generated command changes to the sensitive path list passed to the dry-run formatter.

Validation

  • pnpm generate
  • Focused CLI tests: 8 passed across 3 files, including real Hyperdrive origin.password and origin.access_client_secret previews from flags and --body
  • pnpm check:type in packages/cli
  • pnpm check:lint
  • pnpm check:format

Follow-up

  • Opaque payloads without field sensitivity metadata, including Workers bulk secrets, still need upstream annotations for field-level redaction.
  • This branch is behind main, which updated Vitest from 4.1.0 to 4.1.11. Repository instructions require separate approval before bringing that dependency and lockfile change onto this branch.

Fixes #103

@pkg-pr-new

pkg-pr-new Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
npm i https://pkg.pr.new/cf@167

commit: 1da60a8

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

cf --help startup

mean stddev min max
PR 332.9 ms 4.4 ms 325.1 ms 341.7 ms
base 334.1 ms 11.0 ms 325.3 ms 374.6 ms

Δ (PR vs base): ↓ -1.1 ms (-0.3%)

Measured with hyperfine on ubuntu-latest (3 warmup runs, 20 timed runs). CI numbers carry ±a few ms of runner jitter; treat small deltas as noise.

@ask-bonk

ask-bonk Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

LGTM

github run

@ask-bonk

ask-bonk Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Review: 1 findings.

Posted 1 inline finding.

github run

@ask-bonk

ask-bonk Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

No new concerns since the last review

github run

@ask-bonk

ask-bonk Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

@penalosa Bonk workflow was cancelled.

View workflow run · To retry, trigger Bonk again.

@ask-bonk

ask-bonk Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

No new concerns since the last review

github run

@penalosa
penalosa marked this pull request as ready for review October 2, 2026 10:46
@ask-bonk

ask-bonk Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

No new concerns since the last review

github run

@penalosa
penalosa marked this pull request as draft October 2, 2026 10:47
@ask-bonk

ask-bonk Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

LGTM

github run

@penalosa
penalosa marked this pull request as ready for review October 2, 2026 11:06
@penalosa
penalosa added this pull request to the merge queue Oct 2, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 2, 2026
@penalosa
penalosa enabled auto-merge October 2, 2026 21:11
@ask-bonk

ask-bonk Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

LGTM

github run

@ask-bonk

ask-bonk Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

LGTM

github run

@penalosa
penalosa added this pull request to the merge queue Oct 5, 2026
Merged via the queue into main with commit 2ff6a55 Oct 5, 2026
9 checks passed
@penalosa
penalosa deleted the investigate/issue-103 branch October 5, 2026 08:56
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.

--dry-run prints secret values in plain text

2 participants