Skip to content

security: bind cloud eviction authority records to private storage - #182

Draft
seonghobae wants to merge 6 commits into
mainfrom
security/cloud-eviction-record-authority-v1
Draft

security: bind cloud eviction authority records to private storage#182
seonghobae wants to merge 6 commits into
mainfrom
security/cloud-eviction-record-authority-v1

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Purpose

Harden the durable control records that bind cloud-source eviction intent, completion, and attributed human approval. Protected main created these immutable records with process-default file mode and only later re-resolved the pathname to mark them read-only; the control directory also accepted Unix group/world write authority. A crash before chmod could therefore leave a broader authority record, a pathname replacement could redirect post-write hardening, and another principal with directory write access could replace an authority record between operations.

Test-first repair

  • RED ce9a1c6a987beb5578ccc501c5894df614ce460c adds a production-bound regression through write_immutable_source_eviction_approval, proving group-write (0o020) and other-user-write (0o002) directories fail closed and create no approval record. It also locks the atomic-create/object-bound hardening contract.
  • GREEN candidate 39c01799ee689558ee0120d7976cd6d4ca20e0ea rejects shared-writable Unix control directories with stable eviction-dir-writable-by-others, creates authority records with Unix mode 0o400 at create_new, and performs post-write hardening through the already-opened file descriptor with file.set_permissions instead of re-resolving the pathname.
  • Fresh main -> head comparison is ahead, ahead_by = 2, behind_by = 0, with merge base exactly current protected main.

Exact current state

  • Exact head: 39c01799ee689558ee0120d7976cd6d4ca20e0ea.
  • Live protected main: bc22aa078b4ad57574e5a11f3c99e667833a76bd.
  • Semantic delta is exactly src-tauri/src/cloud_eviction.rs plus src-tauri/tests/cloud_eviction_record_authority.rs.

Scope / non-duplication

This does not enable source eviction; protected main still fails closed where identity-bound OS recycle is unavailable. It narrows only local durable authority storage. #179 owns the analogous provider-sync evidence boundary, #181 owns cloud-review decision files, #174 owns generic cleanup routing, #156 owns repository-wide exact production coverage, #150 owns Podman desktop evidence, and #149 owns canonical acquisition documentation. No other active line is imported here.

Required before merge

Keep Draft until the unchanged exact head passes native and all live required central workflows, all valid current-head findings are addressed, repository-wide exact 100% owned-production coverage is satisfied without exclusions or threshold weakening, and fresh live-base ancestry remains current. Pending, queued, skipped-required, failed, stale, predecessor, status-only, model-only, or synthetic evidence is not passing.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 9 minutes

Limit details: You’ve used all 1 included review currently available under your plan.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1b2970c1-c4da-458e-ab66-e20523d2a403

📥 Commits

Reviewing files that changed from the base of the PR and between be418ba and e14553f.

📒 Files selected for processing (2)
  • src-tauri/src/cloud_eviction.rs
  • src-tauri/tests/cloud_eviction_record_authority.rs

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.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Rate Limit Exceeded

@seonghobae have exceeded the limit for the number of chat messages per hour. Please wait 5 minutes and 34 seconds before sending another message.

@opencode-agent opencode-agent 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.

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 success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before 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 head e14553f71f1832e3aba0f13597625f7a294dc874.

  • Head SHA: e14553f71f1832e3aba0f13597625f7a294dc874

  • Workflow run: 31930573919

  • 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"]
Loading

@opencode-agent

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: e14553f71f1832e3aba0f13597625f7a294dc874
  • Workflow run: 31930573919
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

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 success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before 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 head e14553f71f1832e3aba0f13597625f7a294dc874.

  • Head SHA: e14553f71f1832e3aba0f13597625f7a294dc874

  • Workflow run: 31930573919

  • 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"]
Loading

@seonghobae
seonghobae marked this pull request as draft August 17, 2026 09:07
@seonghobae
seonghobae dismissed opencode-agent[bot]’s stale review August 22, 2026 07:35

Dismissing: this REQUEST_CHANGES referenced workflow run 31930573919 where coverage-evidence failed at the same head SHA. coverage-evidence has since been re-run and now reports pass (verified via gh pr checks). No unresolved review threads remain. Re-request review to re-validate.

@opencode-agent opencode-agent Bot added area: auth Authentication, authorization, identity, or tenant isolation area: security Security boundary, hardening, or vulnerability prevention priority: high High-priority or P1 work status: draft Draft pull request type: security Security vulnerability or security-specific remediation labels Aug 22, 2026
@seonghobae seonghobae added bug Something isn't working priority: medium Normal-priority or P2 work type: bug Defect or incorrect behavior labels Sep 7, 2026 — with ChatGPT Codex Connector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: auth Authentication, authorization, identity, or tenant isolation area: security Security boundary, hardening, or vulnerability prevention bug Something isn't working priority: high High-priority or P1 work priority: medium Normal-priority or P2 work status: draft Draft pull request type: bug Defect or incorrect behavior type: security Security vulnerability or security-specific remediation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant