Skip to main content
Sometimes the compliance Kosli calculates for an attestation isn’t the decision your organization stands behind. A security scan reports findings that your security team has accepted as false positives, or a review passed but the reviewer turns out not to be independent of the change. An override records that decision on the trail: it sets a new compliance status for one attestation, and stores who made it, when, and why.
An override doesn’t delete or edit the original attestation. Kosli records the override as a new event on the trail, so the trail stays append-only. Both the original attestation and the override stay in the trail’s events, and the audit trail shows the original result and the decision that replaced it.

Who can override

Overriding is a write to a trail, so it needs the same role as reporting an attestation: Admin or Member. Readers and Snapshotters can’t override. This applies to users and service accounts alike.

Send an override

Use the kosli attest override command, or send a POST request to the trail’s override endpoint. Both take the same information: The optional fields are stored on the override, not on the original attestation. The API endpoint is:
Use the base URL of the instance your organization lives on. The endpoint returns 200 with the body "OK". The CLI reads the organization, API token, and host from KOSLI_ORG, KOSLI_API_TOKEN, and KOSLI_HOST like any other kosli command.

Make a non-compliant attestation compliant

A trail is non-compliant because its security-review attestation reported findings. The security team has reviewed them and accepts them as false positives:
The trail becomes compliant. Its events show the original non-compliant attestation and, after it, the override with its reason.

Make a compliant attestation non-compliant

An override works in the other direction too. The security-review attestation passed, but the reviewer was not independent of the change author:
The trail becomes non-compliant. Use the optional fields to connect the decision to the evidence behind it, such as a risk-acceptance ticket:

Override an attestation on an artifact

When the flow template puts the attestation under an artifact, tell Kosli which artifact it belongs to. There are two ways to point at it. By fingerprint. Use the attestation’s own name, such as unit-tests:
By the artifact’s template name and git commit. The CLI takes the qualified name app.unit-tests with --commit, as other kosli attest commands do. The API takes the attestation’s own name, with the artifact’s template name in target_artifacts:
Like other kosli attest commands, --commit is read from the git repository at --repo-root, which defaults to the current directory.
Either way, the artifact and the trail are re-evaluated with the new status.
If you don’t point at the artifact (no fingerprint, and neither the qualified name with --commit in the CLI nor target_artifacts in the API), Kosli looks for the attestation on the trail itself, not on the artifact. When the trail and its template have no trail attestation with that name and type, the request fails with a 400 error.

Override a control decision

A decision recorded against a control is an attestation of type system:decision, so you can override it like any other attestation. Use the name the decision is recorded under: the --name passed to kosli evaluate policy, which defaults to <control>-decision. When the decision was reported, Kosli takes the control from it. When the decision was never reported, there is no decision to take the control from, so name the control with --control. Without it, the override belongs to no control.
--control is only allowed with system:decision. The CLI refuses it for any other type before sending anything.

How overrides behave

  • An override is the newest attestation for its name. Kosli uses its compliance status until something newer arrives. If a new attestation with the same name is reported after the override, the new attestation’s own status applies again. Override again if the decision still holds. A second override replaces the first.
  • You can override an attestation that hasn’t been reported. If the flow template expects an attestation that is missing, an override with new_compliance_status: true marks it compliant and the trail is no longer incomplete. This includes a control decision, as long as you name the control with --control.
  • You can’t override an attestation that doesn’t exist anywhere. If the attestation is neither on the trail nor in its template, the request fails with a 400 error.
  • The artifact must be reported first. Overriding an attestation on an artifact that isn’t on the trail yet fails: with 404 when you point at it by fingerprint, and with 400 when you point at it by template name and commit.
  • You can’t override on an archived flow, and an override for a flow that doesn’t exist fails with a 404 error.

Find overrides in the audit trail

Each override is recorded as an attestation_overridden event on the trail. In the web app it appears in the trail’s Events tab under the attestation’s name, labeled as an override. Open it to see who made the override, when, why, and which attestation it overrides. Through the API, read it from the trail’s events:
is_latest tells you whether the override is still the trail’s current attestation for its name. In the trail’s compliance status, an overridden attestation is the override itself: is_override is true, attestation_id is the override’s ID, original_attestation_id is the ID of the attestation it overrides, and is_compliant is the overridden value. In kosli get trail with --output markdown, its status is marked (override).

Run overrides from a manually triggered workflow

To keep overrides out of ad-hoc terminal sessions, run them from a CI workflow that someone triggers by hand. The person who triggers it, the inputs they gave, and the run itself are then recorded in your CI system as well as in Kosli, and you control who can run it with your CI system’s permissions. This GitHub Actions workflow runs on workflow_dispatch and takes the override fields as inputs. Pick the CLI or the API version:
.github/workflows/kosli-override.yml
A few things make this workflow safer to run:
  • Inputs go through environment variables, not straight into the script, and are quoted where they’re used. The API version also builds the request body with jq. Either way, a value with quotes or shell characters can’t break the request or inject commands.
  • The host comes from the KOSLI_HOST repository variable and falls back to https://app.kosli.com. Set it to https://app.us.kosli.com or your Kosli Dedicated address if your organization lives on another instance.
  • The origin URL links the override back to the workflow run, so anyone reading the trail can see where it came from.
  • The kosli-overrides GitHub environment can require approval from named reviewers before the job runs. Store the API key of a dedicated service account with the Member role as a secret of that environment, so only approved runs can use it.
Kosli records the service account as the reporter of the override, not the person who triggered the workflow. That’s why the workflow adds $GITHUB_ACTOR to the reason.
Last modified on December 4, 2026