Repository navigation
fix: reserve -p for --password and refuse a password typed on the command line - #277
Merged
Merged
Conversation
…port V2 keeps -p for --password on launch:env:update only, so the port is now set with --port alone. A V1-style `launch:functions:serve -p 4000` stops with "Nonexistent flag: -p" and exit 2. The PORT environment variable still wins over --port, as before. The examples and the README usage block now show --port. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
--password on launch:env:update takes no value: the password comes from the hidden prompt or, without a terminal, from standard input. A value typed after it (-p <value>, --password <value>, --password=<value> or -p<value>) used to reach oclif, which printed it back as "Unexpected argument: <value>" or "Nonexistent flag: -<value>", putting the password in the terminal or CI log. LaunchCommand now refuses those forms before parsing, on commands that declare --password, with exit 2 and a message that never repeats the value. -p on its own, last, or before another flag still reads the password as before. Commands without --password leave -p to the flag parser. #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 |
chhavi-mandowara-cstk
approved these changes
Nov 2, 2026
SakshiKoli-CS
approved these changes
Nov 2, 2026
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.
Ticket: CL-7174
What
launch:functions:serve --portno longer has a short flag. In V2,-pmeans--passwordonlaunch:env:updateand nothing else. A V1-stylelaunch:functions:serve -p 4000now stops withNonexistent flag: -pand exit 2. ThePORTenvironment variable still wins over--port, as in V1.launch:env:updateno longer echoes a password typed on the command line.--passwordtakes no value: the password comes from the hidden prompt or, without a terminal, from standard input. Typing one after it used to reach oclif, which printed it back:-p <value>,--password <value>and--password=<value>printedUnexpected argument: <value>.-p<value>printedNonexistent flag: -<value>.That put the password in the terminal or CI log.
LaunchCommandnow refuses all four forms before parsing, with exit 2 and a fixed message that never repeats the value:--password takes no value. Enter the password at the hidden prompt, or pipe it on standard input.-pon its own, last, or before another flag still reads the password as before, soprintf '%s' "$PASSWORD" | csdx launch:env:update … -u <user> -pis unchanged. The check only runs on commands that declare--password. Every other command leaves-pto oclif.Tests
src/core/password-argv.test.ts: the four refused forms, with a random value, and three accepted placements of-p/--password.src/core/launch-command.test.ts: a command without--passwordleaves-p <value>to the parser.test/integration/environments-update.test.ts:-p <random value>exits 2 with the fixed message, the value appears in neither stdout nor stderr, and no request is sent.test/integration/functions-serve-port.test.ts:-p 4000is a nonexistent flag with exit 2.serve.test.tsasserts--porthas no short flag.tscare clean. The Talisman and trufflehog scans againstv2-devare clean, and the.talismanrcchecksums are in the commits that changed each file.scripts/launch-cli-manual-testscases 75 and 90 cover both changes (separate workspace PR). Case 90 passes 15/15 against this branch.Known edge, deliberately left: a value that oclif would reject anyway, such as
--name -preview, now gets the--passwordmessage instead of oclif's "Flag --name expects a value". It's still exit 2.#claude_code#
🤖 Generated with Claude Code