Skip to content

fix: mask PSST_PASSWORD in child process output - #41

Open
master085358 wants to merge 2 commits into
Michaelliv:mainfrom
master085358:fix/mask-psst-password
Open

master085358 wants to merge 2 commits into
Michaelliv:mainfrom
master085358:fix/mask-psst-password

Conversation

@master085358

Copy link
Copy Markdown

Problem

When PSST_PASSWORD is set (keychain fallback), running psst run echo $PSST_PASSWORD
prints the master password in plaintext. The shell expands $PSST_PASSWORD before psst
sees the argument, and since the vault may be empty (no secrets to mask), the value
passes through unmasked.

Fix

Always add PSST_PASSWORD to the masking list in both exec.ts and run.ts,
regardless of whether the vault contains secrets.

Testing

export PSST_PASSWORD=test123
psst run echo $PSST_PASSWORD
# Before: test123
# After:  [REDACTED]

Your Name added 2 commits September 8, 2026 09:35
…ntials file)

Hybrid of duanddqn/psst sqlite-keystore approach with stricter security:
- keystore.db stores vault key encrypted with PBKDF2(100k) + AES-256-GCM
- Password must come from PSST_PASSWORD env var — never persisted to disk
- No ~/.psst/credentials file (unlike upstream fork)
- New command: psst passwd (change keystore password via env vars)
- config.json records keyBackend: sqlite for vault discovery
@master085358
master085358 force-pushed the fix/mask-psst-password branch from a26018d to 711d9b5 Compare September 8, 2026 08:22
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