Skip to content

Enforce root host filesystem boundary - #12

Open
omry wants to merge 1 commit into
pr11from
pr12
Open

Enforce root host filesystem boundary#12
omry wants to merge 1 commit into
pr11from
pr12

Conversation

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR enforces a stricter security boundary for root (UID 0) application runtimes by rejecting any host filesystem authority (host input binds, shared-state binds, and explicit output binds) before Docker container creation, and by rejecting root one-shot output options before any host-path preparation.

Changes:

  • Extend runtime host-source tracking with an Authority classification (input vs shared-state vs explicit-output) and validate it against the locked runtime policy.
  • Enforce “root runtime cannot use host binds / explicit output” across readiness gating, lifecycle execution, and provider install flows, with early-fail semantics.
  • Add targeted test coverage and update design/docs + changelog fragment for the new root host authority contract.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/probe/local_account_linux_test.go Adds coverage that root runtime account realization rewrites passwd entry deterministically.
internal/dockerdeploy/runtime_readiness.go Threads runtime UID into host-source validation during runtime readiness gating.
internal/dockerdeploy/runtime_readiness_test.go Adds coverage that root host binds are rejected before running a published container; updates readiness test inputs for authority.
internal/dockerdeploy/runtime_host_preflight.go Introduces Authority classification and enforces root runtime host-bind/output rejection in host-source validation.
internal/dockerdeploy/runtime_host_preflight_test.go Expands unit coverage for authority drift, root rejection behavior, and early root rejection before host inspection.
internal/dockerdeploy/provider_install_run.go Adds early root host-authority validation for install plans before building/preparing destination.
internal/dockerdeploy/provider_install_run_test.go Verifies install rejects root host binds before build/destination mutation.
internal/dockerdeploy/provider_install_lifecycle_execute.go Updates lifecycle executor wiring to pass runtime policy for per-command host-source validation.
internal/dockerdeploy/one_shot_output.go Rejects root runtime use of --output-dir/--output-file before creating/claiming host paths.
internal/dockerdeploy/one_shot_output_test.go Adds regression test ensuring root is rejected before filesystem mutation; makes helper robust when tests run as root.
internal/dockerdeploy/environment_lifecycle_executor.go Validates lifecycle command host sources against runtime policy (including root rejection) before running containers.
internal/dockerdeploy/environment_lifecycle_executor_test.go New tests covering lifecycle root bind rejection and host-kind enforcement.
docs/CONTROLLED_SESSION_DESIGN.md Documents the root host authority enforcement and clarifies pre-container enforcement semantics.
docs/BLUEPRINT_ENVIRONMENT_MODEL.md Updates the blueprint contract description for root runtime restrictions (binds + output options).
docs/BACKLOG.md Updates backlog items to reflect remaining open work (root warning + special file confinement).
.changes/unreleased/+root-host-authority.yaml Adds a Security changelog fragment for the new root host authority rejection behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

omry commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: f7282c826a

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@omry
omry force-pushed the pr12 branch 2 times, most recently from aa88661 to b4dbb1a Compare August 4, 2026 06:16
@omry
omry force-pushed the pr12 branch 2 times, most recently from 01e8960 to fcab7e7 Compare August 4, 2026 07:15
@omry
omry force-pushed the pr12 branch 2 times, most recently from 8d032a7 to a17dd8b Compare August 4, 2026 19:55
@omry
omry force-pushed the pr12 branch 2 times, most recently from f9c0720 to c92a016 Compare August 5, 2026 08:00
@omry
omry force-pushed the pr12 branch 2 times, most recently from 0154ef6 to ff22c90 Compare August 5, 2026 18:18
@omry

omry commented Aug 5, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: c1226568e1

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@omry omry added the approved PR reviewed and approved label Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved PR reviewed and approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants