cli path & tilde expansion - #55
Closed
Dheerajsom wants to merge 3 commits into
Closed
Conversation
`codex-security scan` expands `~` in its repository, path, and
`--output-dir` arguments (targets.ts, runtime.ts), but the CLI layer
resolved several other user-supplied paths with a bare `resolve()`.
Because PowerShell never expands `~` for native command arguments -- and
no shell expands it inside quotes -- `~/security-scans` reached the CLI
verbatim and became a directory literally named `~` under the current
directory:
codex-security bulk-scan repos.csv --output-dir ~/security-scans
# wrote ./~/security-scans instead of $HOME/security-scans
Scan results landed somewhere the user did not expect, a stray `~`
directory was left behind, and resuming the campaign from another
directory could not find the ledger.
Route the affected arguments through a shared `resolveCliPath` helper so
they expand `~` like the rest of the toolchain: `bulk-scan <input>` and
`--output-dir`, `export <scan-dir>`, `--output`, and `--source-root`,
`scans list <repository>` and `--scan-root`, and the `install-hook`
repository. The interactive bulk-scan wizard expands the output
directory it prompts for as well.
The personal-account fix replaced the only multi-organization test, so nothing checked that every organization still appears in the picker or that the list stays sorted. Restore that case and add one for accounts with no organizations, which must skip the prompt entirely.
3 tasks
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.
No description provided.