Gate: metadata

Introduction

The “metadata” gate provides users a variety of attributes to create policy rules that check against image SBOM metadata. Currently, the following attributes are provided in the “metadata” gate for policy rule creation:

  • size
  • architecture
  • os type
  • distro
  • distro version
  • like distro
  • layer count

Example Use-case

Scenario 1

Goal: Create a rule that results in a STOP action for an image SBOM containing alpine OS.

Example rule set configuration in Anchore Enterprise

Gate: metadata
Trigger: attribute
Required Parameters: attribute = “os type”, check = “=”, value = “alpine”
Action: STOP

metadata

Reference: metadata

Trigger NameDescriptionParameterDescriptionExample
attributeTriggers if a named image metadata value matches the given condition.attributeAttribute name to be checked.size
attributeTriggers if a named image metadata value matches the given condition.checkThe operation to perform the evaluation.>
attributeTriggers if a named image metadata value matches the given condition.valueValue used in comparison.1073741824
Last modified September 16, 2024