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
Reference: metadata
Trigger Name | Description | Parameter | Description | Example |
---|---|---|---|---|
attribute | Triggers if a named image metadata value matches the given condition. | attribute | Attribute name to be checked. | size |
attribute | Triggers if a named image metadata value matches the given condition. | check | The operation to perform the evaluation. | > |
attribute | Triggers if a named image metadata value matches the given condition. | value | Value used in comparison. | 1073741824 |