Gate: image_source_drift

Introduction

The “image source drift” gate allows users to perform checks against the difference between an image source repo SBOM and the build image SBOM. The difference operates by “contains” relationships where the analyzed image SBOM is the base “target” and the source revisions are the “source” for calculation.

Example Use-cases

Scenario 1

Goal: Create a rule that results in a STOP action for missing packages in an image SBOM that were supposed to be present based from the image source SBOM.

Example rule set configuration in Anchore Enterprise

Gate: image source drift
Trigger: package removed
Action: STOP

drift

Scenario 2

Goal: Create a rule that results in a STOP action for npm packages found in an image SBOM with versions lower than the ones specified in the image source SBOM.

Example rule set configuration in Anchore Enterprise

Gate: image source drift
Trigger: package downgraded
Optional Paramaters: package types = “npm”
Action: STOP

drift2

Reference: image_source_drift

Trigger NameDescriptionParameterDescriptionExample
package_downgradedChecks to see if any packages have a lower version in the built image than specified in the input source sbomspackage_typesTypes of package to filter byjava,npm
package_removedChecks to see if any packages are not installed that were expected based on the image’s related input source sbomspackage_typesTypes of package to filter byjava,npm
no_related_sourcesChecks to see if there are any source sboms related to the image. Findings indicate that the image does not have a source sbom to detect drift against
Last modified September 16, 2024