From 366e712e69a4f91a9c33970b4516a810d8b5c484 Mon Sep 17 00:00:00 2001 From: robnester-rh Date: Thu, 24 Oct 2024 10:52:51 -0400 Subject: [PATCH] EC-905 - Document input.snapshot in policy.input This commit documents the modification that was introduced to the policy input in https://github.com/enterprise-contract/ec-cli/pull/1737 to include the provided snapshot. Signed-off-by: robnester-rh --- docs/modules/ROOT/pages/policy_input.adoc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/modules/ROOT/pages/policy_input.adoc b/docs/modules/ROOT/pages/policy_input.adoc index af0d60db1..91faf0a5f 100644 --- a/docs/modules/ROOT/pages/policy_input.adoc +++ b/docs/modules/ROOT/pages/policy_input.adoc @@ -11,7 +11,7 @@ being available. Not all information is available for all images. This is noted description of each attribute. It is important to note that this command may proccess multiple images at the same time. In such -cases, a different input is generated for each image. In other words, policy rules only eve have +cases, a different input is generated for each image. In other words, policy rules only ever have access to the information about a single image. [,json] @@ -29,6 +29,7 @@ access to the information about a single image. } ], "image": #ImageDescriptor + "snapshot": #SnapshotDescriptor } #ImageDescriptor: { @@ -54,6 +55,19 @@ access to the information about a single image. "url": "" } } + +#SnapshotDescriptor: { + "application": "", + "displayName": "", + "displayDescription": "", + "components": [..."#SnapshotComponentDescriptor"] +} + +#SnapshotComponentDescriptor: { + "name": "", + "containerImage": "", + "source": #SourceDescriptor" +} ---- `.attestations` is an array of objects. Each object contains the `.statement` and the `.signatures` @@ -101,3 +115,7 @@ information is not given to the command. The SourceDescriptor contains the the single `git` attribute which hold an object with information about a git repository. `.revision` is a string holding a git reference. This could be a commit ID, branch, etc. `url` is the the URL of the git repository. + +The SnapshotDescriptor contains the information about the application snapshot provided to the `ec validate image` command. `.application` is a string holding the name of the application. `.displayName` is a string holding the display name of the application. `.displayDescription` is a string holding the display description of the application. `.components` is an array of SnapshotComponentDescriptor objects. + +The SnapshotComponentDescriptor contains the information about the components of the application snapshot provided to the `ec validate image` command. `.name` is a string holding the name of the component. `.containerImage` is a string holding the container image of the component. `.source` is a SourceDescriptor object.