Skip to content

P0-1: mask secret env vars in deployment detail UI#88

Merged
mastermanas805 merged 1 commit into
mainfrom
fix/p0-secret-mask
May 16, 2026
Merged

P0-1: mask secret env vars in deployment detail UI#88
mastermanas805 merged 1 commit into
mainfrom
fix/p0-secret-mask

Conversation

@mastermanas805
Copy link
Copy Markdown
Member

Masks secret-keyed env vars (•••••••• + per-row reveal toggle) in the DeployDetailPage Env-vars tab; removes the full-value title tooltip for sensitive rows. Defence-in-depth pair to the API-side redaction (api c569500, already live).

Part of P0-1 from the 2026-05-16 bug-hunt. 43 tests across api+web; tsc clean.

🤖 Generated with Claude Code

…fence-in-depth)

Defence-in-depth layer 2 for the plaintext credentials exposure. The API
(layer 1) now redacts credential-bearing env var values server-side.
The dashboard provides a second layer: any non-vault env var whose
uppercased key matches the secret heuristic (contains SECRET/PASSWORD/
PASSWD/PWD/TOKEN/_KEY/APIKEY or ends with URL/URI/DSN) is displayed as
bullets (••••••••) by default.

Changes:
- Add isSensitiveEnvKey() helper mirroring the API-side key heuristic
- Add ENV_VAR_MASK_DISPLAY and ENV_VAR_REDACTED_SENTINEL constants
- Replace plaintext {v} + title={v} render with masked display + reveal toggle
- Server-redacted values ("***") show a disabled reveal button with tooltip
  explaining the value is only available via API/CLI
- Vault refs (vault://...) are explicitly left unmasked — they carry no
  embedded credentials and need to be readable for debugging
- Remove the full-value title={v} tooltip for sensitive rows to prevent
  over-the-shoulder leaks even without clicking reveal

Tests:
- 3 new tests: masks-by-default, reveal-on-click, vault-refs-unmasked
- Pre-existing failures: 4 PricingPage tests (unrelated, pre-existing on main)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mastermanas805 mastermanas805 merged commit be4c8d3 into main May 16, 2026
1 of 2 checks passed
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