Skip to content

[sandbox-hardening] Avoid loading startup files during workspace operations - #5406

Merged
dhavalkapil-oai merged 1 commit into
mainfrom
dhavalkapil/avoid-workspace-startup-files
Oct 22, 2026
Merged

dhavalkapil-oai merged 1 commit into
mainfrom
dhavalkapil/avoid-workspace-startup-files

Conversation

@dhavalkapil-oai

@dhavalkapil-oai dhavalkapil-oai commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Summary

SDK file checks and snapshot creation start login shells, which can load shell startup files from the workspace. Change those helper commands from sh -lc to sh -c so they do not execute workspace startup files.

Add regression tests for snapshot saving, shell approval outcomes, and file checks.

Test plan

  • Focused sandbox tests: 149 passed, 1 skipped.
  • Full repository verification passed: formatting, lint, type checks, 12,297 parallel tests and 107 serial tests.

Issue number

Fixes PSEC-10090

Checks

  • Added regression tests.
  • Ran .agents/skills/code-change-verification/scripts/run.sh.
  • Confirmed all verification steps pass.
  • Completed independent code review.

@dhavalkapil-oai
dhavalkapil-oai marked this pull request as ready for review October 21, 2026 22:25
@dhavalkapil-oai
dhavalkapil-oai requested review from a team, rm-openai and seratch as code owners October 21, 2026 22:25
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T22:27:07.009475Z 2a8915f Draft marked ready
🔒 Security Review ✅ Completed 2026-10-21T22:27:20.710842Z 2a8915f Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@markstuart-oai markstuart-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated source review of 2a8915fc4d8759e301c713e1b6ba033d40ff1a90: approved. No actionable findings in the six-file diff.

The fixed file-operation checks and workspace fingerprint helper now use non-login shells while preserving argument handling, explicit command execution, and snapshot compatibility. The regression tests exercise the real Runner path, approval and rejection, saved content, and cleanup. The existing content-based helper installation also picks up the revised script.

All 23 hosted checks pass at this commit, including Python 3.10–3.14 tests, Windows tests, native macOS sandbox, containers, lint, type checks, and CodeQL. I reviewed immutable source and existing test/CI evidence; I did not run candidate code or tests locally. Protected merge checks remain in force.

@dhavalkapil-oai
dhavalkapil-oai added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit 841dfdd Oct 22, 2026
25 checks passed
@dhavalkapil-oai
dhavalkapil-oai deleted the dhavalkapil/avoid-workspace-startup-files branch October 22, 2026 00:39
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