Redact admin passwords from default studio list JSON - #4730
Open
chubes4 wants to merge 1 commit into
Open
Conversation
Keep inventory machine output non-secret and send credential retrieval through `studio config get admin-password`.
Collaborator
📊 Performance Test ResultsComparing 5273c82 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4729.
Summary
studio list --format=jsonno longer emitsadminPassword, TLS material, or other secret fields on stdout.studio status --format=jsonis audited the same way and no longer emitsadminPassword.studio config get admin-password. Do not log that value.listSites()still receives the full record so GUI credential flows are unchanged.Root cause
studio list --format=jsonserialized each site with...site, so the entire stored site record — including encodedadminPasswordand any extra secret fields — was dumped to stdout. Table output never showed passwords, so JSON had a surprising secret surface.Verification
npx vitest run apps/cli/commands/site/tests/list.test.ts apps/cli/commands/site/tests/status.test.ts apps/cli/lib/tests/site-secret-fields.test.ts(19 passed)npx eslinton the changed CLI files (no findings)AI assistance
OpenAI gpt-5.6-sol via OpenCode general coding subagent inspected the CLI list/status serializers, implemented the redaction, added contract tests, and opened this PR. Chris Huber directed the work and remains responsible for the change.