You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7ebbb21
Browse filesBrowse the repository at this point in the historyBrowse files
rustez-cli: drop --password, read it from a file, stop deriving Debug over it (#55)
* rustez-cli: drop --password, read it from a file, stop deriving Debug over it
--password put the device password in argv, visible to every other
process on the host via ps and preserved in shell history. The
existing $RUSTEZ_PASSWORD/--key-file/interactive-prompt fallbacks
already covered the safer cases; only the flag itself needed to go.
Replaced it with --password-file <PATH>, read through the same
regular-file/non-symlink/mode-0600 checks the codebase already applies
to other credential files (mirroring rustmistmcp's
validate_credential_file). Precedence is now file > env > key > prompt.
ConnOpts keeps its Debug derive rather than getting a hand-written one:
with the password flag gone, password_file is the only credential-
adjacent field left on the struct, and it holds a path, not a secret.
Documented the invariant on the struct so a future field addition
doesn't reopen this quietly.
Verified: cargo test -p rustez-cli (32 passed, including new coverage
for the trailing-newline strip, the empty/wrong-mode/symlink refusals,
and the file > env precedence); cargo clippy -p rustez-cli --all-targets
(clean); cargo tree -p rustez-cli -e normal has no tempfile entry (test
fixture dependency only, dev-dependencies).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* rustez-cli: fix fmt, stop leaking password via vsrx integration test args
- cargo fmt --all: reformat write_password_file's signature to fit
rustfmt's line width, fixing the red Formatting CI job on PR #55.
- Percy review F1: the ignored vSRX integration test still passed the
device password as `-p`/`--password`, the exact CLI-arg leak this PR
removes, and it no longer parses since the flag is gone. Pass it via
RUSTEZ_PASSWORD instead.
- Percy review F2: add a regression test asserting `-p`/`--password`
are rejected by the parser, so the flag can't be silently reintroduced.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
0 commit comments