Skip to content

feat(permissions): check the statements each caller puts - #146

Open
PiquelChips wants to merge 1 commit into
feat/permissions-browsefrom
feat/permissions-statement-checks
Open

PiquelChips wants to merge 1 commit into
feat/permissions-browsefrom
feat/permissions-statement-checks

Conversation

@PiquelChips

Copy link
Copy Markdown
Member

Any caller can put any statement: a review in someone else's name, a result of a kind only CI issues, a statement about a revision they can't read, or a promotion copying a result they may not see.

Puts now go through permissions::Writer for a signed-in caller, and anonymous callers only read.

Statements:

  • Records must be the caller's: a statement's issuer is them.
  • Its kind must be one they annotate, promotions included.
  • It must be about a record they see, and a promotion's original too, so no one copies a result they can't read.
  • Reserved kinds come only from whom the policy names, whoever puts them: an admin token narrowed out of admin abandons nothing.

A record that carries an attachment the repository has must bring it, so no one reads one by naming its id. The records of a batch are read before the store's, so a batch can hold revisions and statements about them.

Pushes share only the user's own statements: others' are theirs to share, and the remote finds this node's, like divergence, itself.

Note

Written by Claude Opus 5.5 in Claude Code (via T3 Code)

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

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

Next included review available in 34 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3c5652da-ac51-4ffa-8214-194c081c4390
Commits

Reviewing files that changed from the base of the PR and between c67ce60 and fa4a849.

Files selected for processing: 10

  • AGENTS.md
  • README.md
  • apps/origin-src/benches/sync.rs
  • apps/origin-src/src/annotations/mod.rs
  • apps/origin-src/src/permissions.rs
  • apps/origin-src/src/server.rs
  • apps/origin-src/src/service.rs
  • apps/origin-src/src/sync.rs
  • apps/origin-src/src/workspace/remote.rs
  • apps/origin-src/tests/http.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@PiquelChips
PiquelChips added this pull request to stack #165 November 22, 2026 14:59
@PiquelChips
PiquelChips force-pushed the feat/permissions-statement-checks branch from 7382412 to 6505eaa Compare November 22, 2026 15:04
@PiquelChips
PiquelChips force-pushed the feat/permissions-statement-checks branch 2 times, most recently from 2fbb817 to 46197ee Compare November 22, 2026 18:54
Any caller could put any statement: a review in another's name, a
result of a kind only CI issues, a statement about a revision they
can't read, or a promotion copying a result they may not see.

Puts now go through `permissions::Writer` for a signed-in caller, and
anonymous callers only read. A statement's issuer must be the caller,
its kind one they annotate, a promotion's too, and they must see what
it's about, and for a promotion, its original. Reserved kinds come only
from whom the policy names, whoever puts them: an `admin` token
narrowed out of `admin` abandons nothing. A record that carries an
attachment the repository has brings it, so no one reads one by naming
its id. The records of a batch are read before the store's, so a batch
can hold revisions and statements about them.

Pushes share only the user's own statements: others' are theirs to
share, and the remote finds this node's, like divergence, itself.
@PiquelChips
PiquelChips force-pushed the feat/permissions-statement-checks branch from 46197ee to fa4a849 Compare November 22, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant