capabilities.work

Create Policy and Evaluate Image

A 2-step recipe with Anchore. We can help you get access.

Recipe · 2 steps

Create Policy and Evaluate Image

with Anchore

Create a policy and immediately evaluate an analyzed image against the new policy id.

  1. Create a new security policy from the supplied name and rule set. Anchore returns the persisted policy including its generated id.
  2. Evaluate the analyzed image against the freshly created policy id and capture the resulting gate action.
What you'll need to have ready
  • authorization: HTTP Basic authorization header value (e.g. "Basic dXNlcjpwYXNz").
  • imageDigest: The SHA256 digest of the analyzed image to evaluate.
  • tag: Optional image tag to scope the policy evaluation.
  • name: Human-readable name for the new policy.
  • description: Optional description of the policy intent.
  • rules: The list of policy rules (gate/trigger/action) for the policy.
For your developer

Arazzo workflow anchore:create-policy-and-evaluate, 2 operations: createPolicy → checkImagePolicy. Specs on APIs.io.