Skip to content

fix(review): enable hosted Linux sandbox - #1162

Merged
jesse-merhi merged 1 commit into
mainfrom
jesse/read-only-review-landlock
Aug 14, 2026
Merged

jesse-merhi merged 1 commit into
mainfrom
jesse/read-only-review-landlock

Conversation

@jesse-merhi

@jesse-merhi jesse-merhi commented Aug 14, 2026 •

Copy link
Copy Markdown
Member

Summary

  • enable the Linux user-namespace settings required by the hosted review sandbox
  • verify the real read-only, network-isolated sandbox before authentication or review execution
  • fail the setup step instead of publishing a verdict when sandbox startup is broken

Root cause

The hosted Ubuntu runner allowed the review process to start, but AppArmor rejected bubblewrap while it configured loopback inside the isolated network namespace. Every repository command failed before execution, yet the degraded report could still reach publication.

The setup action now applies the same hosted-Linux preparation used by the upstream action, then exercises the exact review permission profile with /bin/true. Self-hosted and non-Linux runners are unchanged.

Behavior

Before: a review could publish after every checkout command failed with RTM_NEWADDR: Operation not permitted.

After: hosted Linux must enter the read-only, network-isolated sandbox successfully before the review starts. A sandbox regression stops the workflow before a verdict can be produced.

Proof

  • action contract: 77/77 tests passed
  • formatting: clean
  • diff check: clean
  • independent pre-commit review: no findings
  • independent post-commit review: no findings
  • hosted proof: run 31771166758, exact branch fad063b7e6d9
    • the hosted Ubuntu setup action and its exact :read-only sandbox smoke passed
    • the target checkout then completed successfully, with no bubblewrap or RTM_NEWADDR failure
    • the later target review lease stopped on a separate GitHub installation rate limit before repository review; no degraded verdict was published

Scope

  • workflow code: +22/-0
  • tests: +7/-0
  • no dashboard, status-record, review-schema, or target-repository behavior changes
  • self-hosted runners are intentionally excluded from the hosted-runner kernel preparation

Copilot AI lite review requested due to automatic review settings August 14, 2026 04:51
@clawsweeper

clawsweeper Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 14, 2026
@clawsweeper

clawsweeper Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 14, 2026, 1:03 AM ET / 05:03 UTC.

ClawSweeper review

What this changes

The PR enables user-namespace kernel settings on GitHub-hosted Linux runners and preflights Codex’s read-only, network-isolated sandbox before review execution.

Regression provenance

Possible regression — probable (reproduction; failure trace). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

Keep this member-authored PR open for maintainer security-boundary review. The review sandbox itself reproduced the reported Bubblewrap loopback failure before any repository command could run, while the submitted hosted-run proof reports the intended after-fix preflight.

Priority: P2
Reviewed head: fad063b7e6d90732d4613fcbe6aaa01a475ca50e
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch and reported hosted proof are useful, but the runner-wide security boundary needs maintainer confirmation.
Proof confidence 🌊 off-meta tidepool Not applicable: This repository-member PR is not subject to the external-contributor proof gate; its body nevertheless supplies a linked hosted-run trace for the exact branch.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This repository-member PR is not subject to the external-contributor proof gate; its body nevertheless supplies a linked hosted-run trace for the exact branch.
Evidence reviewed 4 items Reproduced sandbox startup failure: The local review command failed before executing its first read-only repository operation with bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted, matching the PR’s described failure mode.
Focused hosted-runner change: The supplied PR diff limits the sysctl changes and sandbox smoke test to GitHub-hosted Linux runners, leaving self-hosted and non-Linux runners outside this path.
Regression assertion coverage: The supplied test diff asserts the hosted-runner condition, both kernel settings, and the exact read-only sandbox command.
Findings None None.
Security Needs attention Hosted job-wide AppArmor relaxation: Setting kernel.apparmor_restrict_unprivileged_userns=0 affects unprivileged user-namespace creation for the remainder of the hosted job, beyond the immediate smoke command.

How this fits together

ClawSweeper’s GitHub Actions workflows install Codex and run repository review commands inside a read-only sandbox. The setup action prepares the hosted runner, validates sandbox startup, then permits the review workflow to publish a verdict only if that prerequisite succeeds.

flowchart LR
  A[GitHub-hosted Linux runner] --> B[Codex setup action]
  B --> C[Enable user namespace settings]
  C --> D[Read-only sandbox preflight]
  D --> E{Sandbox starts?}
  E -->|Yes| F[Repository review]
  E -->|No| G[Stop before verdict publication]
Loading

Decision needed

Question Recommendation
Should GitHub-hosted review jobs temporarily disable AppArmor’s unprivileged-user-namespace restriction so Codex’s required Bubblewrap isolation can start? Accept hosted-only preparation: Merge the hosted-Linux-only setting and preflight, accepting the ephemeral-job security tradeoff to preserve the read-only sandbox.

Why: The patch intentionally changes a kernel-level containment setting for the whole hosted job; source inspection and CI cannot determine the repository’s acceptable threat-model tradeoff.

Before merge

  • Resolve security concern: Hosted job-wide AppArmor relaxation - Setting kernel.apparmor_restrict_unprivileged_userns=0 affects unprivileged user-namespace creation for the remainder of the hosted job, beyond the immediate smoke command.
  • Resolve merge risk (P1) - The action disables AppArmor’s unprivileged-user-namespace restriction for the remainder of each hosted job, so maintainers need to explicitly accept that temporary runner-wide security tradeoff.
  • Resolve merge risk (P1) - The preflight proves sandbox startup, while the linked run reports that a later review was stopped by an unrelated GitHub installation rate limit; it does not demonstrate a complete verdict-publication path.

Findings

  • [medium] Hosted job-wide AppArmor relaxation — .github/actions/setup-codex/action.yml:68
Agent review details

Security

Needs attention: The patch deliberately lowers an AppArmor user-namespace restriction for each hosted job, requiring maintainer acceptance of that containment tradeoff.

Review metrics

Metric Value Why it matters
Patch scope 2 files affected; workflow +22, tests +7 The change is narrowly limited to Codex setup and its existing action-contract test.

Merge-risk options

Maintainer options:

  1. Accept the hosted-runner boundary (recommended)
    Merge after a maintainer explicitly accepts the ephemeral hosted-job kernel-setting tradeoff and the linked proof remains applicable to the current head.
  2. Choose an alternative sandbox setup
    Pause the PR if maintainers do not accept disabling the AppArmor user-namespace restriction for the hosted job.

Technical review

Best possible solution:

Accept the narrowly hosted-only kernel preparation only if its runner-wide security tradeoff matches the workflow threat model, while retaining the preflight that prevents degraded review publication.

Do we have a high-confidence way to reproduce the issue?

Yes: attempting a read-only repository inspection in this review environment failed before command execution with the same Bubblewrap RTM_NEWADDR: Operation not permitted loopback error described by the PR.

Is this the best way to solve the issue?

Unclear: failing before publication is the correct reliability boundary, but a maintainer must decide whether the hosted-job-wide AppArmor setting is an acceptable way to enable it.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against c9eda83c29d2.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This repository-member PR is not subject to the external-contributor proof gate; its body nevertheless supplies a linked hosted-run trace for the exact branch.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a bounded review-workflow reliability repair rather than an active user-facing outage.
  • merge-risk: 🚨 security-boundary: The workflow changes kernel controls that govern unprivileged user namespaces before sandboxed execution.
  • merge-risk: 🚨 availability: A failed sandbox preflight intentionally stops review jobs before verdict publication.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This repository-member PR is not subject to the external-contributor proof gate; its body nevertheless supplies a linked hosted-run trace for the exact branch.

Evidence

Security concerns:

  • [medium] Hosted job-wide AppArmor relaxation — .github/actions/setup-codex/action.yml:68
    Setting kernel.apparmor_restrict_unprivileged_userns=0 affects unprivileged user-namespace creation for the remainder of the hosted job, beyond the immediate smoke command.
    Confidence: 0.96

What I checked:

  • Reproduced sandbox startup failure: The local review command failed before executing its first read-only repository operation with bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted, matching the PR’s described failure mode.
  • Focused hosted-runner change: The supplied PR diff limits the sysctl changes and sandbox smoke test to GitHub-hosted Linux runners, leaving self-hosted and non-Linux runners outside this path. (.github/actions/setup-codex/action.yml:55, fad063b7e6d9)
  • Regression assertion coverage: The supplied test diff asserts the hosted-runner condition, both kernel settings, and the exact read-only sandbox command. (test/clawsweeper.test.ts:2349, fad063b7e6d9)
  • Hosted behavior proof: The PR body links GitHub Actions run 31771166758 for the exact branch and reports that the setup action’s read-only sandbox smoke passed before a separate installation rate limit stopped later review work. (fad063b7e6d9)

Likely related people:

  • jesse-merhi: The provided PR metadata identifies this repository member as author of the focused hosted-sandbox change; local feature-history inspection could not run because sandbox startup failed first. (role: repository member and current change author; confidence: low; commits: fad063b7e6d9; files: .github/actions/setup-codex/action.yml, test/clawsweeper.test.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record maintainer acceptance or rejection of the hosted-job AppArmor tradeoff.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-14T04:53:10.365Z sha fad063b :: needs maintainer review before merge. :: none

@jesse-merhi

Copy link
Copy Markdown
Member Author

/clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 14, 2026
@jesse-merhi
jesse-merhi merged commit 746cb85 into main Aug 14, 2026
109 of 110 checks passed
@jesse-merhi
jesse-merhi deleted the jesse/read-only-review-landlock branch August 14, 2026 06:55
@jesse-merhi
jesse-merhi restored the jesse/read-only-review-landlock branch August 14, 2026 07:07
@vincentkoc
vincentkoc deleted the jesse/read-only-review-landlock branch September 25, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants