Commit 02b005e
committed
Fix CrossVendorAudit codex invocation: non-git PAI dirs and OpenAI env overrides
Two failure modes in invokeCodex():
1. codex exec refuses to run when the working directory is not a git
repository ('Not inside a trusted directory'), so the cross-vendor
audit always returns skipped on installs that persist the PAI
directory by means other than git. Pass --skip-git-repo-check.
2. The spawned codex process inherits the parent environment, and
codex's auth precedence puts OPENAI_API_KEY / OPENAI_BASE_URL above
~/.codex/auth.json and config.toml. A stray key in the parent shell
silently flips the audit from the user's configured codex auth
(e.g. ChatGPT subscription) to direct API billing. Scrub both vars
from the child env.
Verified live on a non-git PAI install: audit runs end-to-end and
persists a structured verdict where it previously logged
'skipped: codex exit 1'.1 parent 2fde1bb commit 02b005e
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
192 | 202 | | |
193 | 203 | | |
194 | | - | |
195 | | - | |
| 204 | + | |
| 205 | + | |
196 | 206 | | |
197 | 207 | | |
198 | 208 | | |
| |||
0 commit comments