Skip to content

fix(macos): mask sensitive wizard cli prompts#76746

Merged
sallyom merged 1 commit into
openclaw:mainfrom
sallyom:fix-76698-macos-sensitive-wizard
May 3, 2026
Merged

fix(macos): mask sensitive wizard cli prompts#76746
sallyom merged 1 commit into
openclaw:mainfrom
sallyom:fix-76698-macos-sensitive-wizard

Conversation

@sallyom

@sallyom sallyom commented May 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Honor WizardStep.sensitive in the bundled openclaw-mac wizard text prompt path.
  • Use termios to disable terminal echo for sensitive input instead of getpass(3), so long credentials are not truncated.
  • Suppress saved credential previews for sensitive prompts while preserving blank-to-keep-existing behavior.

Fixes #76698.

Validation

  • swift build --package-path apps/macos --product OpenClaw --configuration release
  • swift build --package-path apps/macos --product openclaw-mac --configuration release
  • PTY proof with fake wizard gateway: 190-char sensitive input accepted, answer matched exactly, terminal log contained neither submitted token nor saved initial value ✅
  • git diff --check
  • swiftformat --lint apps/macos/Sources --config .swiftformat blocked locally: swiftformat: command not found
  • swiftlint --config .swiftlint.yml blocked locally: swiftlint: command not found

Notes

This is the focused macOS CLI follow-up to #76693.

@openclaw-barnacle openclaw-barnacle Bot added app: macos App: macos size: XS maintainer Maintainer-authored PR labels May 3, 2026
@clawsweeper

clawsweeper Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

Summary
The PR updates openclaw-mac wizard to honor sensitive text steps with termios no-echo input, hides existing credential previews, preserves blank-to-keep-existing behavior, and adds a changelog entry.

Reproducibility: yes. Source inspection gives a high-confidence reproduction path: send a sensitive wizard text step to openclaw-mac wizard on current main, and the text branch uses echoing readLineWithPrompt plus [initial] display.

Next step before merge
This is an active implementation PR with a protected maintainer label and no narrow automated repair finding; the next step is maintainer review plus normal macOS CI/validation.

Security
Cleared: The diff reduces credential exposure and does not add dependencies, permissions, network calls, artifact downloads, or package-resolution changes.

Review details

Best possible solution:

Land a focused macOS CLI fix that honors the existing WizardStep.sensitive contract without changing storage, transport, or broader onboarding behavior.

Do we have a high-confidence way to reproduce the issue?

Yes. Source inspection gives a high-confidence reproduction path: send a sensitive wizard text step to openclaw-mac wizard on current main, and the text branch uses echoing readLineWithPrompt plus [initial] display.

Is this the best way to solve the issue?

Yes. The proposed termios no-echo branch is the narrow owner-side fix for the macOS CLI client, avoids getpass(3) truncation, and preserves blank-to-keep-existing behavior.

What I checked:

Likely related people:

  • steipete: git show and git blame show the current WizardCommand.swift path and echoing text prompt branch came from commit 399d7f6. (role: introduced current macOS CLI wizard path; confidence: medium; commits: 399d7f61783f; files: apps/macos/Sources/OpenClawMacCLI/WizardCommand.swift)
  • anurag-bg-neu: Merged PR fix(onboarding): mask token/credential inputs in CLI wizard prompts #76693, commit 727398f, added sensitive support to the Node wizard contract and explicitly documented this macOS CLI follow-up. (role: recent sensitive wizard contract contributor; confidence: high; commits: 727398f41a85; files: src/wizard/session.ts, src/wizard/clack-prompter.ts, src/wizard/session.test.ts)

Remaining risk / open question:

  • The PR diff does not add an automated Swift CLI regression test for no-echo input or >128-character sensitive values, so that behavior still depends on the claimed PTY proof and normal macOS validation.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 935f078a89f0.

@byungskers

This comment was marked as low quality.

@sallyom
sallyom merged commit d0497d1 into openclaw:main May 3, 2026
40 of 43 checks passed
lxe pushed a commit to lxe/openclaw that referenced this pull request May 6, 2026
Merged via squash.

Prepared head SHA: 8a63773
Reviewed-by: @sallyom
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
Merged via squash.

Prepared head SHA: 8a63773
Reviewed-by: @sallyom
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
Merged via squash.

Prepared head SHA: 8a63773
Reviewed-by: @sallyom
@sallyom
sallyom deleted the fix-76698-macos-sensitive-wizard branch May 29, 2026 15:15
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
Merged via squash.

Prepared head SHA: 8a63773
Reviewed-by: @sallyom
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
Merged via squash.

Prepared head SHA: 8a63773
Reviewed-by: @sallyom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS openclaw-mac wizard CLI: honor step.sensitive for credential text prompts

2 participants