create_security_disposition
Record a disposition for a finding. For a cluster vulnerability: acknowledge it (security.triage) or accept the risk (security.manage), scoped to the add-on the occurrence is attributed to, with a reason, an optional review deadline and whether it lapses when a fix ships. Every occurrence the selector matches is dispositioned at once - run preview_security_disposition first and put its match count in the proposal. Needs an active occurrence with high-confidence add-on attribution; one without is refused. For a Semgrep or Checkov finding that blocks the Ankra Pipelines image gate (scope repository_code, security.manage): record it as false_positive or accepted_risk (accepted_risk needs expires_at within a year), with a reason; the gate stops blocking on that rule in that file and names the disposition on every run it lets through, and the finding stays scanned and recorded. Use this for a reviewed false positive instead of adding an inline nosemgrep. A CRITICAL finding is refused. Reversible: revoke_security_disposition reopens the findings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | With scope repository_code: the file the finding is in, as get_application_code_security reports it (file_path). | |
| tool | No | With scope repository_code: semgrep or checkov, the scanner that reported the finding (get_application_code_security). | |
| scope | No | What the disposition is pinned to. For a cluster vulnerability, with occurrence_id: organisation_addon (the default) pins the add-on the occurrence is attributed to across the organisation and needs a high-confidence add-on attribution; workload pins the one workload (cluster, kind, namespace, name); image pins the image digest wherever it runs. Use workload or image when the occurrence has no add-on attribution (operator-managed pods, plain manifests, control-plane pods, charts outside the catalogue). repository_code is a Semgrep or Checkov finding of a pipeline repository: pass application_id or repository_id, tool, rule_id and path instead of occurrence_id, and the Ankra Pipelines image gate stops blocking on that rule in that file while the disposition is active. Never for a CRITICAL finding. | |
| reason | No | Why. Recorded on the audit trail and shown on every matched finding. | |
| rule_id | No | With scope repository_code: the finding's rule id, as get_application_code_security reports it. | |
| expires_at | No | Review deadline as an RFC 3339 timestamp; the policy reads as expiring / expired around it. | |
| disposition | Yes | acknowledged (we know, working on it) or accepted_risk (we will live with it, needs security.manage). With scope repository_code: false_positive (the rule does not apply to this code) or accepted_risk. | |
| occurrence_id | No | Occurrence id (UUID) from get_security_finding or list_security_finding_occurrences - the anchor the policy's selector is derived from. Required unless scope is repository_code. | |
| repository_id | No | With scope repository_code: the pipeline repository (UUID). Exactly one of application_id or repository_id. | |
| application_id | No | With scope repository_code: the application (UUID) whose pipeline repository the finding belongs to. Exactly one of application_id or repository_id. | |
| allow_unmatched | No | Create the policy even when it currently matches no eligible occurrence (default false). | |
| expire_when_fix_available | No | Lapse automatically once a fixed version exists (default false). |