Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

Close the approval-forgery hole: check every write, not just additions

362932289cfbecbca4f9937def07b21671bc1aee · Keenan Nemetz · 18d ago · parent 1eeca4e6

Close the approval-forgery hole: check every write, not just additions

The check that an approval is written by the principal it names used
`--diff-filter=A`, so it only looked at newly added files. An approval that already
existed could simply be edited: approve commit A, then rewrite approvals/<me>.json
to name commit B and land B with the approver's name on it. A test now demonstrates
that exact forgery before the fix and refuses it after.

The check is now driven by the change status of every path: any non-deletion on
`approvals/<name>.json` requires the actor to be `<name>`, and the first push (no
old commit to diff, so every approval in the tree is new) is checked the same way.
Deletion is limited to the owner, because removing someone else's approval forges
nothing but erases their statement; an admin may still do it, and that is written to
the audit log rather than happening silently.

Renames land in the same net: without rename detection a move appears as an add,
which the check sees, and the destination path is what the check reads.

Also worth recording what the enforcement actually rests on, since the file name is
the only name that carries authority: the SSH handshake resolves the presented key
to a user through data/trusted_keys/<user>.keys, that mapping is one-to-one (a key
already owned by another user is refused at add time and fatal at load), and the
resolved name reaches the hook as VOLE_ACTOR, which the client cannot set because
the exec surface is a two-entry whitelist. `author` fields in meta.json remain
display-only and decide nothing.

The remaining limitation is honest: this is enforcement at push time, not proof at
read time. A clone shows that an approval file exists, not that the server saw its
owner write it. Signed attestations in Phase 7 are what would make it verifiable
offline.

README.md +9−4

@@ -160,10 +160,15 @@ vole acl approvals demo 2 # require two approvals (default 1)
160 160 vole acl approvals demo 0 # back to admin-only
161 161 ```
162 162
163 Admins can push a protected branch directly. An approval can only be written by
164 the person it names — the hook compares the file's name to the SSH identity — so
165 `approvals/keenan.json` cannot be committed by anyone else. Every merge is
166 recorded in `data/audit.log` with the request id and approvers.
163 Admins can push a protected branch directly. Every merge is recorded in
164 `data/audit.log` with the request id and approvers.
165
166 An approval can only be written by the person it names: the hook compares the path
167 to the SSH identity the server resolved from your key, so `approvals/keenan.json`
168 cannot be created *or edited* by anyone else, and only keenan can withdraw it (an
169 admin can, and that is audited). The names in `meta.json` — `author` on an issue or
170 request — are display fields and carry no authority; the approval path is the only
171 name that decides who may land a commit.
167 172
168 173 ## Backup
169 174