# change-approval attestor

Source: https://www.testifysec.com/docs/cilock/attestors/change-approval/

Records one person's approval of one exact change: the repository, the base and head commits, the digest of the changed paths the gate showed, the policy release the approval is for, and the sensitive watchpoints the person reviewed.

Records one person's approval of one exact change: the repository, the base and head commits, the digest of the changed paths the gate showed, the policy release the approval is for, and the sensitive watchpoints the person reviewed.

 

| Field | Value |
| --- | --- |
| Name | `change-approval` |
| Predicate type | `https://testifysec.com/attestations/change-approval/v0.1` |
| Lifecycle | `prematerial` |
| Default binary? | **Yes** |

 

## What it captures

 

The predicate fields, as the attestor signs them:

 

- `repository`: `github.com/<owner>/<repo>`.
 - `base_commit`, `head_commit`: full commit ids. The approval covers `base..head` and nothing else.
 - `changes_digest`: hex sha256 of the observed changes the gate showed for `base..head`.
 - `release_digest`: hex sha256 of the policy release the approval is for.
 - `watchpoints[]`: `{ id, path, category }` for each touched sensitive watchpoint the person reviewed. Empty when none were touched.
 - `decision`: always `approve`.
 - `signer_email`: the email the person signs in as. A verifier requires it to equal the certificate's email.
 - `approved_at`: UTC, truncated to the second.

 

Subjects emitted: `commitsha:<head>` (the head commit id), `changes:<changes_digest>`, and, for a SHA-1 head, `https://testifysec.com/attestations/change-approval/v0.1/commithash:<head>`. That last one is the shape an external attestation's `commitSubject` can declare, so a verify seeded by the commit (`--subjects sha1:<head>`) finds the approval.

 

## When to use

 

When a policy needs proof that a named person looked at a specific change before it landed, for example a gate that holds a push touching sensitive paths until a person approves that exact `base..head` and policy release. A person signs it; an agent cannot.

 

## Flags

 

Each is a `cilock run` / `cilock attest` flag (see `cilock run --help-advanced`).

 

| Flag | Required | Purpose |
| --- | --- | --- |
| `--attestor-change-approval-repository` | Yes | Repository the change is in, `github.com/<owner>/<repo>`. |
| `--attestor-change-approval-base` | Yes | Full commit id the change is based on (the protected branch tip the gate diffed from). |
| `--attestor-change-approval-head` | Yes | Full commit id of the exact change being approved. |
| `--attestor-change-approval-changes-digest` | Yes | Hex sha256 of the observed changes for `base..head`. |
| `--attestor-change-approval-release-digest` | Yes | Hex sha256 of the policy release the approval is for. |
| `--attestor-change-approval-signer-email` | Yes | Email you sign in as. |
| `--attestor-change-approval-watchpoints` | No | Path to a JSON array of `{id, path, category}`. A relative path resolves against the working directory. |

 

## Gotchas

 

- **Human only.** `Attest` refuses unless the run signs through `--human` (the platform's browser login). An enrolled agent or a stored key would sign an approval no person gave, so the attestor returns an error instead. See [`cilock run`](https://www.testifysec.com/docs/cilock/reference/cli#cilock-run-cmd).
 - **Never auto-detected.** The detector fires only when `CILOCK_CHANGE_APPROVAL` is set. Name the attestor with `-a change-approval`; the run still needs every required flag or it refuses.
 - Every field is validated before signing. A missing or malformed value fails the run rather than producing a partial approval.

 

## CLI example

 

```bash
cilock attest --human --step change-approval -a change-approval \
  --attestor-change-approval-repository github.com/acme/widget \
  --attestor-change-approval-base "$BASE_SHA" \
  --attestor-change-approval-head "$HEAD_SHA" \
  --attestor-change-approval-changes-digest "$CHANGES_DIGEST" \
  --attestor-change-approval-release-digest "$RELEASE_DIGEST" \
  --attestor-change-approval-signer-email you@example.com
```

 

## See also

 

- [Catalog row](https://www.testifysec.com/docs/cilock/reference/attestor-catalog)
 - [`design-signoff`](https://www.testifysec.com/docs/cilock/attestors/design-signoff), the same human-only pattern for a design document
 - [`github-review`](https://www.testifysec.com/docs/cilock/attestors/github-review), [`gitlab-review`](https://www.testifysec.com/docs/cilock/attestors/gitlab-review), [`code-review`](https://www.testifysec.com/docs/cilock/attestors/code-review)

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