-
Notifications
You must be signed in to change notification settings - Fork 0
fix(security): isolate web E2E commands and readiness probes #1347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
seonghobae
wants to merge
11
commits into
main
Choose a base branch
from
fix/sandboxed-web-e2e-isolation-clean
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
3db0789
fix(security): require OS isolation for web e2e commands
seonghobae d42a97f
fix(security): harden loopback and document isolation
seonghobae 823cd89
fix(security): mount isolated root filesystem
seonghobae ce93f55
docs(security): document isolated web verification
seonghobae 871d50b
fix(e2e): cover and harden isolated command paths
seonghobae a5bdec8
Merge branch 'main' into fix/sandboxed-web-e2e-isolation-clean
seonghobae 8b9d884
docs: make sandbox changelog actionable
seonghobae c50e26b
fix(e2e): fail closed on rejected sandbox commands
seonghobae 391233f
fix(e2e): validate readiness before launch
seonghobae 524093e
fix(e2e): back off after server readiness errors
seonghobae 9951601
Merge branch 'main' into fix/sandboxed-web-e2e-isolation-clean
opencode-agent[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # Sandboxed web command isolation | ||
|
|
||
| `sandboxed_web_e2e.py` requires Linux `bubblewrap` (`bwrap`) by default. Each | ||
| backend, frontend, and E2E command runs with a fresh writable `tmpfs` root and | ||
| `/tmp`, plus one writable copied-repository bind at `/workspace`; the copied | ||
| repository and temporary homes are mapped there. Host runtime roots and the | ||
| minimal `/etc` identity, DNS, and time files are mounted read-only, so the host | ||
| filesystem is not reachable through absolute paths or `..` traversal. | ||
|
|
||
| Before wrapping a command, the helper resolves its executable and rejects paths | ||
| outside the read-only system roots mounted by bubblewrap. A tool installed in a | ||
| host-only location must be installed into one of those roots or the run exits | ||
| with code `126` before any service starts; the result marker records that code | ||
| and the selected backend. | ||
|
|
||
| Use `--isolation disabled` only for trusted local debugging. The result marker | ||
| records the requested mode and resolved backend so CI evidence cannot be | ||
| mistaken for an OS-isolated run. If required isolation is unavailable, the | ||
| command exits with code `126` before starting any service. | ||
|
|
||
| Readiness polling remains loopback-only and does not follow redirects. Invalid | ||
| readiness URLs are reported as a coded readiness failure (`125`) rather than an | ||
| uncaught traceback. The network declaration is evidence metadata; callers that | ||
| need stronger network policy must run this helper inside a network-restricted | ||
| runner or container. | ||
|
|
||
| ## References | ||
|
|
||
| MITRE. (2026). *CWE-918: Server-side request forgery (SSRF)*. | ||
| https://cwe.mitre.org/data/definitions/918.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.