# code-review attestor

Source: https://www.testifysec.com/docs/cilock/attestors/code-review/

The cilock code-review attestor signs the result of a direct code review (one reviewer session's verdict on one exact diff) as its own in-toto statement bound to the reviewed commit.

Reads the result JSON a direct-review runner wrote (`jade review worker-run` in testifysec/judge), checks its shape, and exports it as a bare in-toto statement, never inside a collection.

 

| Name | `code-review` |
| --- | --- |
| Predicate type | `https://aflock.ai/attestations/code-review/v0.1` |
| Lifecycle | `prematerial` |
| Default binary? | No |
| Category | code-review (primary) |
| Recommended trace | off — no syscall tracing needed |
| Auto-attaches when | - preenv\_set: CODE\_REVIEW\_RESULT |

The facts in this box are generated from the CI/lock binary's own catalog (`cilock tools list`). Do not hand-edit — run `npm run gen:catalog`.

 

## What it captures

 

The predicate is the runner's result field for field. A field the attestor does not know is refused, never dropped.

 

- `head`, `base`: the 40-hex commits of the reviewed diff.
 - `verdict`: `APPROVED`, `CHANGES_REQUESTED` or `INCOMPLETE`. `severity`, `scope` (`full` or `partial`).
 - `config`: `source` (always `default-branch`), `mainSha`, `promptDigest`, `rubricDigest`, `model`, `effort`, `threatModel`, `threatModelDigest`, `requestedModel`, `servedModel`, `servedModelSource`.
 - `execution`: `shellTool`, `sandbox`, `diffInline`, `checkout`.
 - `reviewer` (`account`, `session`) and `requester` (`agent`, `session`).
 - `transcriptDigest`, `findingsDigest`, `codexExit`, `reason`, `diffBytes`, `worker`, `startedAt`, `finishedAt`, `phases`.
 - `timeVerified`: `finishedAt` as RFC 3339, the signed time a policy orders reviews of one head by.

 

One subject: `https://aflock.ai/attestations/code-review/v0.1/commithash:<head>` with digest `sha1=<head>`. Base and main are not subjects, so a digest search never finds the review as evidence about another commit.

 

The attestor records every verdict as it is. It does not decide whether a push is admitted; write that rule in policy.

 

## When to use

 

On the machine that ran the review, signed by the reviewer's own identity:

 

```text
cilock attest --step code-review -a code-review --attestor-code-review-result review.json
```

 

## Flags

 

- `--attestor-code-review-result <path>`: the runner's result JSON. Default: `$CODE_REVIEW_RESULT`.

 

## How a verifier consumes this

 

A policy external of `predicateType` `https://aflock.ai/attestations/code-review/v0.1` with `commitSubject` `https://aflock.ai/attestations/code-review/v0.1/commithash:` binds the statement to the pushed commit, its functionaries pin the reviewer identities, and a `timestampConstraint` makes the newest review of the head decide.

 

---

**This page is generated from the CI/lock tool catalog.** Don't edit it here — the source is [`attestation/detection/docs/code-review.doc.md`](https://github.com/aflock-ai/rookery/edit/main/attestation/detection/docs/code-review.doc.md) in [aflock-ai/rookery](https://github.com/aflock-ai/rookery). The same catalog powers `cilock tools show code-review` in the CLI, so a single edit keeps the terminal and the website in sync.

[Edit this page →](https://github.com/aflock-ai/rookery/edit/main/attestation/detection/docs/code-review.doc.md) ·  [Add a new tool →](https://github.com/aflock-ai/rookery/new/main/attestation/detection/docs)

When you open the pull request: if you are an **AI agent**, add the `ai-agent` label. If you are a **human**, add the `human` label.

Reference generated from the product documentation. Match commands and support details to your installed release.
