feat(security): add brokered sandbox egress - #6118
Open
RaresKeY wants to merge 2 commits into
Open
Conversation
|
Changed-file classification: backend/runtime. Author-reported runtime / visual state
Checkboxes are author attestations. GitHub Actions results remain the execution evidence for CI; this check does not prove that a local command ran. This comment updates automatically when the description or changed files change. |
This was referenced Aug 19, 2026
Open
Open
RaresKeY
marked this pull request as ready for review
August 19, 2026 10:14
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR extracts the trusted HTTP(S) egress transport from #5818 into a focused, independently reviewable security slice. It adds the broker and loopback bridge, public-address and reconnect validation, bounded HTTP and CONNECT handling, proxy credential/header scrubbing, TLS/CA-preserving tunneling, concurrency and lifetime limits, and broker/bridge lifecycle tests. It intentionally excludes Docker/Compose installation, AppArmor and boot checks, application network-profile propagation, and process-execution wiring. The launch chain depends at runtime on the seccomp substrate tracked by #6114 and implemented by PR #6119.
Target branch
dev, notmain. All PRs land indev;mainis curated by the maintainer at each release. If your PR is onmainby accident, click "Edit" on this PR and change the base.Linked Issue
Fixes #6115
Depends on PR #6119 for the trusted seccomp substrate.
Part of #6091
Part of #5815
Related to and supersedes the corresponding egress slice of #5818.
Type of Change
Checklist
devdocker compose uporuvicorn app:app) and verified the change works end-to-end. Type-checks and unit tests are not enough.How to Test
python3 -m pytest -q tests/test_egress_broker.pythrough the secretless review runner; this produced 46 passing tests covering address filtering, DNS/reconnect behavior, HTTP and CONNECT policy, redirects, TLS/CA handling, proxy-variable scrubbing, bridge lifecycle, concurrency, failure handling, and the independent Makefile trust contract for root/group defaults, absolute interpreter resolution, isolated-Ishebang rewriting, and root-owned0755installation.make -C security/egress checkthrough the secretless review runner; this passed Python compilation for both trusted helpers.Visual / UI changes — REQUIRED if you touched anything that renders
This slice changes no UI or rendering behavior.
Anything that changes what the UI looks like — buttons, icons, padding, colors, fonts, spacing, layout, CSS, HTML, SVG, or any
static/js/module that draws to the DOM — needs all of the following. PRs that change rendering without these WILL be closed.--red,--fg,--bg,--card,--border, etc.) — do not introduce new color values, font sizes, or spacing units.static/index.html) or plain text.Fira Code) for primary UI text. Don't override.Screenshots / clips
Not applicable: this PR contains no UI or visual changes.