Repository navigation
feat(secrets): add launch:secrets list, set and unset commands - #275
Conversation
Adds the secrets resource (SecretsApi list over REST, secrets error catalog with read-context wording, KEY/UPDATED presenter) and the launch:secrets:list command, registered like launch:variables:list. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Adds SecretsApi add/refresh over REST, write-context error wording with value redaction, a bounded stdin or masked-prompt value source, the client-exposed prefix warning and the launch:secrets:set command. It reads the existing keys first to choose POST or PUT and never accepts the value as a flag or argument. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Adds SecretsApi.remove over REST (one DELETE per key, key URL-encoded in the path), the SecretRemover orchestrator and launch:secrets:unset with a repeatable --key and the --yes confirm gate. A key that cannot be removed is reported by name while the rest are still removed, and the command then exits 1. Secret commands describe --key as a secret key. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Reject the dot-segment keys "." and ".." in set, unset and secretsPath so a request can never leave the /secrets/ prefix. Report a non-API failure in unset by naming the keys removed, failed and not attempted. Build glued short-flag test values so their first character is never a flag. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
Rename string constants whose names contain secret (a UI message and an error-code namespace) so Snyk Code stops reporting them as hardcoded secrets. Names only, no behaviour change. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
dhruv-parekh-cs
left a comment
There was a problem hiding this comment.
Reviewed the whole PR: no high or medium issues.
Cross-repo (CL-8166): #274 (also on v2-dev) and #268 (on development) are still open and add their own implementation of the same launch:secrets commands. This PR is the one to merge; close those two so neither is merged alongside it.
— 🤖 launch-pr-review-agent (Claude)
Generated by Claude Code
Brings in launch:secrets (#275). The only conflict was .talismanrc: the README.md and src/resources.test.ts entries now carry the checksums of the merged files. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Opened by
launch-developer-agent(Claude). Replies from this account are the AI agent too. Review stays human. Merge: by this agent once one human approves, with no changes requested and green checks.Jira: https://contentstack.atlassian.net/browse/CL-8166
Replaces #268, which was built on
development; nothing fromdevelopmentis carried over. The branch isCL-8166-v2becauseCL-8166holds #268's history.Changes
Adds
csdx launch:secrets:list,setandunseton the V2 REST client (GET/POST/PUT/DELETE …/environments/:uid/secrets), in the shape oflaunch:variables:*.listshows onlyKEYandUPDATED.setreads the value from a masked prompt or piped stdin (no--valueflag), adds or refreshes after confirming (--yesfor CI) and warns on client-exposed prefixes.unsettakes repeatable--key. A secret value never reaches output, logs or errors. Nothing prompts without a terminal, and API errors get clear messages.Testing Plan
npm run testonsrc/secrets,src/commands/launch/secrets,test/guardsand all oftest/integration: pass. New files at 100% on all four metrics (measured on those files; the full coverage run fails on unrelated proxy tests in this sandbox). Lint,tscand build pass.list/set/unsetis still open (needs the secrets REST API deployed).Known Gaps
-yc<secret>,-yd<secret>) is a valid parse, and V2's generic--config/--data-direrror echoes it.--no-verifyas approved after lint-staged, Talisman and TruffleHog ran by hand..talismanrcchecksums refreshed ("secret" wording only).Merge order: independent of the other PRs on this story.
Generated by Claude Code