-
Notifications
You must be signed in to change notification settings - Fork 56
Audit remediation: security, observability, resilience (Phases 1-3) #499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
9b3d7a6
fix(security,correctness): Phase 1 audit remediation
ndycode dc7141f
test(sandbox): redirect HOME/CODEX_HOME to a per-run temp dir (tests-…
ndycode 8a79e06
fix(observability,resilience): Phase 2 audit remediation
ndycode 431af87
fix(prompts): harden GitHub prompt fetch path (Phase 2c)
ndycode 8574309
feat(ui): honor NO_COLOR / FORCE_COLOR / TTY for color output (ui-04)
ndycode 6d3d6ff
fix(runtime): wire the routing mutex into the proxy (accounts-01/08)
ndycode 244bc56
docs: fix version/override drift + guard it (docs-supplychain-03/04)
ndycode 5472bdc
feat(recovery): quarantine + surface corrupt session files (recovery-10)
ndycode d1da64c
fix(config): retry transient FS locks on the config load path (config…
ndycode f7c4bc8
refactor(storage): unify fs-retry code sets (storage-07)
ndycode 1abef7c
fix(prompts): SHA-256 cache integrity + atomic cache writes (prompts-…
ndycode e09d516
fix(recovery): guard sort, validate mutate paths, honest strip result
ndycode 1652239
fix(quota): align capability key + add quota-window staleness escape
ndycode bf504ef
fix(ui): color-bleed, display-width alignment, glyph-mode bar (ui-01/…
ndycode e8cd946
fix(settings): single-source the refresh-interval bounds (settings-hu…
ndycode cb7e38c
fix(request): log deprecation/sunset headers on the error path too (r…
ndycode 8a82f12
test(ci): deterministic property seed + coverage gate on PRs
ndycode 95e9467
feat(cli): add --json to status/list (cli-manager-03)
ndycode e85ed32
fix(chatgpt-import): guard planOcChatgptSync against load/preview thr…
ndycode fca3eb5
fix(config): make load precedence symmetric with save (config-02)
ndycode c1b85c0
fix(local-bridge): allow auth to an auth-enabled runtime proxy (runti…
ndycode ada3e14
fix(scripts): wire the preuninstall lifecycle hook (install-scripts-02)
ndycode 718f899
fix(scripts): detect unlisted vendor files in provenance check (insta…
ndycode 6e04749
fix(review): address greptile + coderabbit findings on audit PR #499
ndycode 7fc3e03
fix(review): second-pass review findings + deferred items (PR #499)
ndycode 39e97da
fix(review): deterministic paths test + Vitest 4 pool config (PR #499)
ndycode f44f2b3
fix(security): close 5 audit findings from adversarial review (round 4)
ndycode 8705de5
fix(recovery,prompts): address round-4 CodeRabbit findings (round 5)
ndycode 6c864fc
test(rotation,status): add coverage requested in round-4 review (roun…
ndycode 7810156
fix: harden the deferred audit items (round 7)
ndycode 14e1140
fix: resolve round-7 CodeRabbit findings (round 8)
ndycode ef5bcb6
fix: resolve round-8 CodeRabbit findings (round 9)
ndycode 19ca67b
fix: resolve round-9 CodeRabbit findings (round 10)
ndycode File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| /** | ||
| * Resolve the effective account-id override for a login, with the documented | ||
| * precedence: an explicit `login --org <id>` argument wins over the ambient | ||
| * CODEX_AUTH_ACCOUNT_ID env var, for that call only. | ||
| * | ||
| * This lives in its own internal module (not exported from the CLI entrypoint) | ||
| * so the concurrency contract — the launcher must NOT mutate process.env for the | ||
| * duration of a login, which raced on re-entry / reused test workers — can be | ||
| * unit-tested without widening the public surface of lib/codex-manager.ts. | ||
| * | ||
| * A blank/whitespace explicit org is treated as absent so an empty `--org ""` | ||
| * does not suppress the env fallback. | ||
| * | ||
| * @param explicitOrg - the value passed to `login --org`, if any | ||
| * @param env - environment to read CODEX_AUTH_ACCOUNT_ID from (injectable for tests) | ||
| * @returns the trimmed effective override, or null when neither source provides one | ||
| */ | ||
| export function resolveOrgOverride( | ||
| explicitOrg?: string, | ||
| env: NodeJS.ProcessEnv = process.env, | ||
| ): string | null { | ||
| const explicit = explicitOrg?.trim(); | ||
| const override = (explicit || env.CODEX_AUTH_ACCOUNT_ID || "").trim(); | ||
| return override.length > 0 ? override : null; | ||
| } |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| /** | ||
| * Canonical set of subcommands routed to the account-manager dispatcher. | ||
| * | ||
| * Kept in a small internal module (rather than exported from the CLI entrypoint | ||
| * lib/codex-manager.ts) so both the dispatcher and the wrapper-routing alignment | ||
| * test (test/codex-routing.test.ts) consume the SAME source of truth — the test | ||
| * can assert AUTH_SUBCOMMANDS ⊇ ACCOUNT_MANAGER_COMMANDS without re-exporting a | ||
| * test-only implementation detail through the public CLI surface (cli-manager-01 | ||
| * /02). This is an internal module, not part of the published package API. | ||
| * | ||
| * @internal | ||
| */ | ||
| export const ACCOUNT_MANAGER_COMMANDS = new Set([ | ||
| "login", | ||
| "list", | ||
| "status", | ||
| "switch", | ||
| "unpin", | ||
| "workspace", | ||
| "best", | ||
| "check", | ||
| "features", | ||
| "usage", | ||
| "verify-flagged", | ||
| "verify", | ||
| "forecast", | ||
| "report", | ||
| "fix", | ||
| "doctor", | ||
| "uninstall", | ||
| "account", | ||
| "budget", | ||
| "bridge", | ||
| "integrations", | ||
| "models", | ||
| "monitor", | ||
| "rotation", | ||
| "why-selected", | ||
| "config", | ||
| "init-config", | ||
| "debug", | ||
| ]); |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.