POST
Decide whether a scan satisfied the policy

Authorizations

Authorization
string
header
required

Authorization: Bearer twk_<prefix>_<secret>.

The prefix is public and safe to log: it is what identifies which credential leaked. The secret is never logged, never returned after creation, and stored only as a SHA-256 hash.

Path Parameters

id
string<uuid>
required

Body

application/json
policy_id
string<uuid>

Evaluate a specific policy. Omit for the enabled one.

pull_request
object

Post the decision back to a GitHub pull request as a single summary comment, replacing the one the previous run left.

Supplied by the caller rather than looked up: the caller is the pipeline and the pipeline is the only thing that knows which pull request it is building: the same commit can be the head of several, and a scan carries none of its own.

Best effort. The verdict is recorded and returned whether or not GitHub accepted the comment, and a deployment with no GitHub App configured simply posts nothing.

Response

A decision, with its reasoning. Branch on blocking, not on the HTTP status.

policy_id
string<uuid>
required
policy_version
integer
required
result
enum<string>
required
Available options:
pass,
warn,
fail
blocking
boolean
required

True only for fail. A warning that blocks is a failure with a friendlier name.

summary
string
required
evaluated_at
string<date-time>
required
id
string<uuid>
scan_id
string<uuid>
policy_name
string
considered
integer
suppressed
integer

Reported even when the policy ignored them.

exempt
integer
truncated
boolean
rules
object[]

Every rule, fired or not: a PASS has to be explainable too.