Skip to main content

Overview

Custom policies evaluate condition logic against supported targets such as vulnerabilities, packages, package versions, manifests, assets, secrets, and code findings. Use custom policies when built-in SLA, package, or manifest policy types do not cover the control you want to express.

Targets

Supported target types are:
  • vulnerability
  • package
  • package_version
  • manifest
  • asset
  • secret
  • code
Each target type supports a different set of condition fields. See Policy condition fields for the source-backed reference. Environment condition fields come from environment mappings, which map repository branches and tags to deployment boundaries.

Condition structure

Conditions use nested groups: Rules use a field, operator, and value:
Condition rule

Operators

Operators depend on the field type: For in, contains, and overlaps, provide a JSON array value.

Actions

Custom policies can define actions:
SLA action

Dry run

Dry run is available for custom policies with a target type. Use it to preview matches for a selected repository before relying on the policy in normal workflows. Dry runs can use the saved condition or a temporary condition override. For manifest and package-version targets, dry run uses current source evidence from the selected repository. Deleted references and removed dependency relationships are excluded.

JSON import

Custom policies can be imported from JSON. Imported policies are created disabled so they can be reviewed before activation.
Import shape