Skip to content

fix(dev): validate sandbox before registering provider keys - #4754

Merged
neekolas merged 1 commit into
mainfrom
codex/sbx-key-validation
Oct 27, 2026
Merged

neekolas merged 1 commit into
mainfrom
codex/sbx-key-validation

Conversation

@neekolas

@neekolas neekolas commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Standalone sandbox key could register a provider credential for a same-name VM that start would reject. Validate the VM in the shared key-registration helper before changing network policy or prompting for the secret.

Extend the manual regression matrix to reject unexpected agents, kits, and host mounts on this path. Tests remain outside CI discovery.

Follow-up to #4753 and its key-validation review comment.

Validation:

  • All 14 manual sandbox tests pass. The pre-fix wrapper fails the five new key-registration cases.
  • ShellCheck and Ruff pass.
  • Adversarial review at 40fbfa3fe9: passed with no findings.

Note

Validate sandbox before registering provider keys in dev/sbx/sandbox

register_key now calls check_vm before building the secret env var, allowing network access, or prompting for the API key. If the check fails, those later steps are skipped.

  • Extends test_sandbox.py to cover key registration for incompatible same-name VMs, and checks that no key prompt, network-policy call, or secret-setting call happens and saved state stays unchanged.

Macroscope summarized 40fbfa3.

@neekolas
neekolas requested a review from a team as a code owner October 27, 2026 15:01
@macroscopeapp

macroscopeapp Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — This is a focused development-wrapper fix that validates the sandbox before changing network policy or registering provider credentials. Because it changes API-key and secret-handling behavior, the credential path requires human review.

You can add or adjust custom eligibility rules. Learn more.

@neekolas
neekolas merged commit 13426e2 into main Oct 27, 2026
39 checks passed
@neekolas
neekolas deleted the codex/sbx-key-validation branch October 27, 2026 15:37
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.

1 participant