feat(sdk): honor command auth and renewable embeddings credentials - #769
feat(sdk): honor command auth and renewable embeddings credentials#769kmbroai wants to merge 3 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
Security findingsBlocking findings (2)
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Security Review
Here are some automated security review suggestions for this pull request.
Reviewed commit: 2699462128
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
There was a problem hiding this comment.
💡 Codex Security Review
Here are some automated security review suggestions for this pull request.
Reviewed commit: 9f201f6ce8
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
Summary
Honor explicitly selected native Codex command authentication across scan preflight, scans, comparisons, and deduplication reviews. Allow SDK callers to supply renewable embeddings credentials without dummy API keys.
Changes
model_providers.<id>.authconfiguration instead of importing managed credentials or injecting an ambient API key. Native Codex executes the helper and renews its token.() => string | Promise<string>in the existing embedder constructor, resolving the callback before each HTTP batch. Expose the embedder and the existing server/store integration through@openai/codex-security/serverwithout starting a listener on import.CODEX_SECURITY_EMBEDDINGS_URLfrom feat: allow configuring the findings embeddings URL #765 with its full-URL semantics, OpenAI default, and Compose wiring unchanged. No new CLI flags, endpoint settings, dependencies, or token-refresh implementation.Testing
pnpm run test --seed 12345andpnpm run test, random seed1234275873): each run passed 2,143 tests with 41 platform/integration skips and 0 failures across 113 files.pnpm run types,pnpm run format, andgit diff --check: passed.pnpm pack(including plugin and TypeScript/dashboard builds) andpnpm run check:packagepassed. Covers the installed server import, strict NodeNext consumer, CLI and SDK lifecycle, credential locking, bundled runtime, and nested worker.Risk and rollout
The callback and server subpath are additive SDK APIs; authentication reporting adds
method: "command". Static-key embeddings behavior, request/response handling, and endpoint configuration are preserved. Callers own embeddings token acquisition, and callback failures do not fall back to previous or ambient credentials.Component planning reports an error when explicit authentication conflicts with an ambient command provider; final matching reports incomplete matching and retains the completed scan artifacts.
Relative helper directories now resolve from the supplied Codex home. Native configuration validation remains authoritative: unsupported legacy inline profiles are still rejected by Codex 0.149.1. Profile forwarding is covered by orchestration tests; the native localhost checks use direct provider selection. Release through the normal package process after review and CI.
Public disclosure review