security: bind Homebrew execution to approved script bytes - #206
security: bind Homebrew execution to approved script bytes#206seonghobae wants to merge 9 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
@coderabbitai review |
Rate Limit Exceeded
|
|
The content-bound Homebrew execution slice is ready for review at exact head |
There was a problem hiding this comment.
Pull request overview
OpenCode cannot approve yet because required coverage evidence did not pass.
Review outcome
1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
-
Problem: The required coverage-evidence job result was
failure, so OpenCode cannot establish approval sufficiency for this head. -
Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.
-
Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present. -
Result: REQUEST_CHANGES
-
Reason: coverage-evidence result was
failure, so required test/docstring evidence was not proven for current head2e7b845b7610a871ec5981d964bcab5cb99df41d. -
Head SHA:
2e7b845b7610a871ec5981d964bcab5cb99df41d -
Workflow run: 32702646057
-
Workflow attempt: 1
Coverage evidence
Coverage Decision
- Result: FAIL
- Test evidence: not proven passing
- Docstring evidence: not proven passing when configured
- Failure count: 1
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (2 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (2 files)"]
R1 --> V1["required checks"]
OpenCode Review Overview
Pull request overviewOpenCode cannot approve yet because required coverage evidence did not pass. Review outcome1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
Coverage evidenceCoverage Decision
Changed-File Evidence Mapflowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (2 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (2 files)"]
R1 --> V1["required checks"]
|
|
Reviewed the two remaining informational threads on exact head |
Purpose
Bind Homebrew planning, model judgment, human approval, and execution to the exact script bytes that were verified, rather than only to pathname plus device/inode identity, while preserving the fixed command, local-model gate, exact confirmation phrase, single-use judgment, audit publication, and macOS-only runtime authority.
Root cause
A same-user actor could rewrite the approved Homebrew executable in place without changing device/inode identity. Re-planning narrowed the race but did not bind the script bytes actually sourced by Bash to the bytes approved by the plan and judgment.
Exact current state
4432ea1aa12ccafd4774828f135898cd333f2d97fe13b27404af46f64960b5f46ae2b806e17830aesrc-tauri/src/brew_cleanup.rsandsrc-tauri/tests/brew_cleanup_snapshot_testability_contract.rs32320000010and Release32319999991are queued; predecessor successes do not transferTest-first repair
The implementation rejects empty or over-8-MiB script objects, reads the already-open verified source into a private anonymous
tempfilesnapshot, hashes the captured bytes with BLAKE3 while copying, fsyncs and rewinds that snapshot, revalidates opened object and current pathname identity/executable admission after capture, bindsdevice:inode:digestinto the existing opaquebrew_identity, and passes only the captured snapshot descriptor to the fixed privileged Bash launcher. Later same-inode writes to the source pathname therefore cannot change the bytes sourced for the approved invocation.The real Unix regression opens an approved executable, mutates the same inode in place, proves device/inode remains unchanged, then proves the retained verified snapshot still contains only the approved bytes. The macOS runtime command remains unavailable on non-macOS platforms.
The branch was advanced non-destructively onto current #205. Current base-to-head comparison proves only the intended content-binding delta remains.
Required before merge
Keep Draft until parent dependencies are integrated or deliberately preserved; every applicable exact-head native and central workflow passes; every valid current-head finding is addressed and threads are resolved; repository-wide exact 100% owned-production coverage is satisfied without weakening; package/SBOM/provenance/release requirements are complete where applicable; and fresh dependency/base ancestry remains current. Pending, queued, absent-required, skipped-required, neutral-required, failed, stale, predecessor, synthetic, diagnostic-only, status-only, model-only, or author-only evidence is non-passing.