Skip to content

fix: resolve scan authentication conflicts and state errors - #22

Merged
daneschneider-oai merged 1 commit into
mainfrom
codex/codex-security-explicit-auth
Jul 28, 2026
Merged

daneschneider-oai merged 1 commit into
mainfrom
codex/codex-security-explicit-auth

Conversation

@daneschneider-oai

Copy link
Copy Markdown
Collaborator

Summary

Resolve the reported Codex Security authentication failures without silently changing account identity, permissions, or billing.

  • Prompt only when an interactive scan has both a verified stored ChatGPT sign-in and an environment API key.
  • Preserve API-key precedence and never prompt in CI, JSON or JSONL output, dry runs, noninteractive terminals, or explicitly configured scans.
  • Add --auth auto|chatgpt|api-key and equivalent TypeScript SDK selection.
  • Explain interactive and noninteractive credential precedence immediately after ChatGPT login; print the exact unset command for the configured key variables.
  • Name the actual selected credential in authentication and model-authorization failures, including in CI.
  • Fail immediately on definitive 401 and 403 responses while retaining retries for genuine network failures and retryable rate limits.
  • Grant the isolated scan sandbox write access to its validated persistent state directory while keeping the scanned repository protected.
  • Report SQLite database errors as local state failures with their actual path and actionable CODEX_SECURITY_STATE_DIR guidance; do not misclassify database connections or workbench permissions as model-network failures.
  • Document the behavior in both the public root and shipped SDK READMEs.

Related: #19 covers the narrow login-warning and credential-specific error fix; this PR additionally implements per-scan interactive selection, explicit CLI and SDK selection, sandbox state permissions, definitive-response handling, and database error classification.

The local pre-release migration mismatch is intentionally excluded: it affects an existing developer database, not fresh OSS installations, and no bundled plugin migrations, package manifests, or lockfiles are changed.

Verification

  • Public frozen-lockfile installation and supply-chain validation: 110 locked entries verified.
  • Full randomized public test suite: 361 passed, 3 expected platform or live-integration skips, 0 failed.
  • Public TypeScript and generated-model checks.
  • Public production TypeScript build and compiled CLI help.
  • Full SDK and public README formatting.
  • Public npm archive validation: 178 entries.
  • Installed-package smoke test: public SDK import, executable CLI, and all 94 bundled plugin files.
  • No package-manifest, lockfile, bundled-plugin, or private monorepo changes.

@daneschneider-oai
daneschneider-oai merged commit b1e2af9 into main Jul 28, 2026
4 checks passed
@daneschneider-oai
daneschneider-oai deleted the codex/codex-security-explicit-auth branch July 28, 2026 23:26
AndrewM-F pushed a commit to AndrewM-F/opencode-security that referenced this pull request Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants