Skip to content

fix(cli): mask credential env values in --help output - #3570

Merged
wpfleger96 merged 1 commit into
mainfrom
wpfleger96/hide-env-values-help
Jul 29, 2026
Merged

fix(cli): mask credential env values in --help output#3570
wpfleger96 merged 1 commit into
mainfrom
wpfleger96/hide-env-values-help

Conversation

@wpfleger96

Copy link
Copy Markdown
Member

clap renders live env var values in help text by default. Three args carrying credentials were exposed this way:

  • BUZZ_PRIVATE_KEY in buzz-cli (crates/buzz-cli/src/lib.rs)
  • BUZZ_AUTH_TAG in buzz-cli
  • BUZZ_PRIVATE_KEY in buzz-acp (crates/buzz-acp/src/config.rs)

Add hide_env_values = true to each. Env var names remain visible for discoverability; only their runtime values are withheld from --help output.

Also adds a regression guard in each crate's test module that walks the clap command tree (recursing into subcommands for buzz-cli) and asserts every arg whose env var name contains KEY, SECRET, TOKEN, PASSWORD, CRED, or AUTH has hide_env_values set. This prevents future credential-bearing args from being added without the masking in place.

@wpfleger96
wpfleger96 requested a review from a team as a code owner July 29, 2026 15:50
@wpfleger96
wpfleger96 force-pushed the wpfleger96/hide-env-values-help branch from c5e0f29 to 23b886c Compare July 29, 2026 15:56
clap renders live env var values in help text by default. Three args
carrying credentials — BUZZ_PRIVATE_KEY in buzz-cli and buzz-acp, and
BUZZ_AUTH_TAG in buzz-cli — were exposed this way. Add
`hide_env_values = true` to each. Env var names remain visible for
discoverability; only their values are withheld.

Also adds a regression guard in each crate that walks the clap command
tree and asserts every arg whose env var name contains KEY, SECRET,
TOKEN, PASSWORD, CRED, or AUTH sets hide_env_values. The guard covers
args added in future, not just today's three.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
@wpfleger96
wpfleger96 force-pushed the wpfleger96/hide-env-values-help branch from 23b886c to ea89492 Compare July 29, 2026 16:00
@wpfleger96
wpfleger96 merged commit 9beb3b8 into main Jul 29, 2026
31 checks passed
@wpfleger96
wpfleger96 deleted the wpfleger96/hide-env-values-help branch July 29, 2026 16:23
joahg added a commit to joahg/buzz-dev-mode that referenced this pull request Jul 29, 2026
…-style

* origin/main:
  fix(cli): mask credential env values in --help output (block#3570)
  Serialize Tauri pre-push checks (block#3567)

Signed-off-by: Joah Gerstenberg <joah@squareup.com>
loganj pushed a commit that referenced this pull request Jul 29, 2026
…dance

* origin/main:
  fix(mobile): keep TLS on relays joined by invite (#3139)
  Improve emoji autocomplete matching (#3571)
  Fix shared agent avatar import profiles (#3578)
  Fix inline raster avatars in agent catalog (#3581)
  revert(acp): remove dead GOOSE_ACP_SCHEDULER_DISABLED env injection (#3576)
  feat(agent): make Gemini and MLflow-route models usable through databricks_v2 (#3569)
  fix(cli): mask credential env values in --help output (#3570)
  Serialize Tauri pre-push checks (#3567)
  chore(release): release Buzz Desktop version 0.5.1 (#3566)
  Run Tauri clippy in pre-push (#3555)
  perf(desktop): move observer-feed archive and decrypt commands off main thread (#3415)
  fix(desktop): preserve shared agent fidelity (#3553)
  Polish mobile navigation and menus (#3486)
  feat(agent): route Claude/GPT model families to their native gateway wire (#3538)

Signed-off-by: npub13n66s06epmqf2kc3v373ez8hj65cuzyvxzjf93vwpervxqn2u7jq2qd9je <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
tlongwell-block pushed a commit that referenced this pull request Jul 30, 2026
* origin/main: (29 commits)
  feat(replica): portable heartbeat-token fence with snapshot-local reader routing (#3268)
  fix(git): channel binding tooling + author remediation for unbound repos (#3626)
  feat: configure S3 URL addressing style (#3400)
  feat: add first-class OpenRouter provider support (#1975)
  feat(agent,acp): wire provider total_tokens through NIP-AM publish chain (#3593)
  chore(release): release Buzz Desktop version 0.5.2 (#3624)
  docs: add Linux rendering troubleshooting guide (#3573)
  fix(desktop): discover bun-installed agent CLIs in ~/.bun/bin (#3343)
  feat(tracing): correlate trace IDs in relay logs (#3608)
  chore(ci): bump Linux AppImage build container to ubuntu:24.04 (#3602)
  feat(cli): mirror Desktop mention delivery (#3330)
  fix(desktop): deduplicate relay outage notification (#3579)
  fix(desktop): reconcile thread arrivals at bottom (#3585)
  fix(mobile): keep TLS on relays joined by invite (#3139)
  Improve emoji autocomplete matching (#3571)
  Fix shared agent avatar import profiles (#3578)
  Fix inline raster avatars in agent catalog (#3581)
  revert(acp): remove dead GOOSE_ACP_SCHEDULER_DISABLED env injection (#3576)
  feat(agent): make Gemini and MLflow-route models usable through databricks_v2 (#3569)
  fix(cli): mask credential env values in --help output (#3570)
  ...

Co-authored-by: Tyler Longwell <tlongwell@block.xyz>
Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
axlroden added a commit to axlroden/buzzer that referenced this pull request Jul 30, 2026
buzz repos create gains an optional --channel flag and buzz repos bind lets us rebind already-announced repos, both from block/buzz#3626 (merged). That is exactly W7 clear-when condition, so drop the row and record the resolution.

Also picks up the CLI credential-masking fix (block/buzz#3570) and 57 other merged commits since the previous pin (2026-07-28).
axlroden added a commit to axlroden/buzzer that referenced this pull request Jul 30, 2026
buzz repos create gains an optional --channel flag and buzz repos bind lets us rebind already-announced repos, both from block/buzz#3626 (merged). That is exactly W7 clear-when condition, so drop the row and record the resolution.

Also picks up the CLI credential-masking fix (block/buzz#3570) and 57 other merged commits since the previous pin (2026-07-28).
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.

1 participant