Skip to content

fix(security): isolate web E2E commands and readiness probes - #1347

Open
seonghobae wants to merge 11 commits into
mainfrom
fix/sandboxed-web-e2e-isolation-clean
Open

fix(security): isolate web E2E commands and readiness probes#1347
seonghobae wants to merge 11 commits into
mainfrom
fix/sandboxed-web-e2e-isolation-clean

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • require Linux bubblewrap isolation by default for backend, frontend, and E2E commands
  • mount a read-only runtime root with a single writable workspace and scoped temporary homes
  • reject non-loopback readiness destinations and redirects to fail closed against SSRF
  • retain explicit disabled mode only for trusted local debugging and document the boundary

Verification

  • python3 -m pytest -q tests/test_sandboxed_web_e2e.py tests/test_repository_branch_coverage_execution_sandboxes.py tests/test_opencode_existing_approval_gate.py tests/test_opencode_security_boundaries.py (92 passed)
  • python3 -m ruff check scripts/ci/sandboxed_web_e2e.py tests/test_sandboxed_web_e2e.py tests/test_repository_branch_coverage_execution_sandboxes.py
  • git diff --check

This clean PR contains only the SSRF/isolation change; it supersedes stale #1342 without its unrelated workflow reverts.


Open in Devin Review

Summary by CodeRabbit

  • 새로운 기능

    • 웹 검증 명령에 Linux bubblewrap 기반 격리 실행을 지원합니다.
    • 격리 환경에서는 읽기 전용 시스템 영역과 /workspace만 수정할 수 있습니다.
    • 실행 결과에 요청된 격리 모드와 실제 사용된 백엔드가 기록됩니다.
  • 버그 수정

    • 준비 상태 확인이 로컬 주소와 리다이렉트만 허용하도록 강화되었습니다.
    • 잘못된 URL과 격리 실행 불가 상황을 구분된 오류 코드로 보고합니다.
  • 문서

    • 웹 명령 격리 방식, 제한 사항 및 디버깅 모드를 설명하는 문서를 추가했습니다.

@seonghobae
seonghobae enabled auto-merge (squash) August 26, 2026 00:07
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Review Change Stack

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e25e64ba-2245-4d19-a3a1-182755642a37

📝 Walkthrough

Walkthrough

웹 검증 helper가 기본 Linux bubblewrap 격리를 사용한다. 명령은 읽기 전용 시스템 루트와 /workspace만 사용한다. readiness URL은 loopback만 허용한다. 격리 및 readiness 실패는 코드와 결과 메타데이터로 보고한다.

Changes

웹 검증 명령 격리

Layer / File(s) Summary
격리 backend와 명령 구성
scripts/ci/sandboxed_web_e2e.py, tests/test_sandboxed_web_e2e.py
--isolation 인자와 bubblewrap backend를 추가했다. 시스템 루트는 읽기 전용으로 마운트한다. writable 경로는 /workspace로 제한한다. 환경 변수 경로와 실행 파일 경로를 검증한다.
서비스 실행과 readiness 결과
scripts/ci/sandboxed_web_e2e.py, tests/test_sandboxed_web_e2e.py, tests/test_repository_branch_coverage_execution_sandboxes.py
backend, frontend, E2E 명령을 격리 실행한다. loopback readiness URL만 허용한다. 격리 불가 시 126, 잘못된 readiness URL 시 125를 반환한다. 결과에 격리 모드와 backend를 기록한다.
격리 동작 계약 문서화
CHANGELOG.md, docs/doctoring/sandboxed-web-command-isolation.md
bubblewrap 요구사항, /workspace 마운트, 실행 파일 제한, 오류 코드, readiness 검증 및 네트워크 제한 범위를 문서화했다.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: 🟡 Moderate · up to 871d5

The new default isolation can break commands that need normal user/group resolution, while invalid command paths may produce unstable failure reporting and the documented writable boundary does not match actual behavior. The PR should receive explicit owner follow-up on these runtime and documentation issues before merging.

Sequence Diagram(s)

sequenceDiagram
  participant main
  participant isolation_backend
  participant service_commands
  participant wait_for_url
  participant e2e_command
  main->>isolation_backend: 격리 backend 해석
  isolation_backend-->>main: bubblewrap 또는 실패
  main->>service_commands: 격리된 backend/frontend 명령 실행
  main->>wait_for_url: loopback readiness URL 확인
  wait_for_url-->>main: 준비 상태 반환
  main->>e2e_command: 격리된 E2E 명령 실행
  e2e_command-->>main: 실행 결과 반환
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 웹 E2E 명령 격리와 readiness probe 강화를 모두 명확하게 요약하며, PR의 주요 변경 사항과 일치합니다.
Docstring Coverage ✅ Passed Docstring coverage is 83.78% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 37 functions across 3 files. (2 skipped: 2 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 83.78% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 37 functions across 3 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sandboxed-web-e2e-isolation-clean

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration Bot 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.

Devin Review found 2 new potential issues.

Open in Devin Review

Comment thread scripts/ci/sandboxed_web_e2e.py
Comment thread scripts/ci/sandboxed_web_e2e.py
@opencode-agent
opencode-agent Bot disabled auto-merge August 26, 2026 02:11
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