Skip to content

Commit 1fab6e5

Browse files
authored
Get image manifests in parallel
* Get image manifests in parallel The versions check in the trusted task rules pulls each task bundle in the attestation which takes too much time. This adds a built-in that pulls all task bundles in parallel. https://issues.redhat.com/browse/EC-1600 Assisted-by: Claude-4.5-opus
1 parent e3bf6b4 commit 1fab6e5

File tree

16 files changed

+472
-157
lines changed

16 files changed

+472
-157
lines changed

antora/docs/modules/ROOT/pages/packages/pipeline_required_tasks.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Produce a warning when a task that will be required in the future is not current
1616
* Rule type: [rule-type-indicator warning]#WARNING#
1717
* WARNING message: `%s is missing and will be required on %s`
1818
* Code: `required_tasks.missing_future_required_task`
19-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/required_tasks/required_tasks.rego#L35[Source, window="_blank"]
19+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/required_tasks/required_tasks.rego#L55[Source, window="_blank"]
2020

2121
[#required_tasks__missing_required_task]
2222
=== link:#required_tasks__missing_required_task[Missing required task]
@@ -26,7 +26,7 @@ Ensure that the set of required tasks is included in the Pipeline definition.
2626
* Rule type: [rule-type-indicator failure]#FAILURE#
2727
* FAILURE message: `%s is missing or outdated`
2828
* Code: `required_tasks.missing_required_task`
29-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/required_tasks/required_tasks.rego#L72[Source, window="_blank"]
29+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/required_tasks/required_tasks.rego#L92[Source, window="_blank"]
3030

3131
[#required_tasks__tasks_found]
3232
=== link:#required_tasks__tasks_found[Pipeline contains tasks]
@@ -36,7 +36,7 @@ Confirm at least one task is present in the pipeline definition.
3636
* Rule type: [rule-type-indicator failure]#FAILURE#
3737
* FAILURE message: `No tasks found in pipeline`
3838
* Code: `required_tasks.tasks_found`
39-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/required_tasks/required_tasks.rego#L59[Source, window="_blank"]
39+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/required_tasks/required_tasks.rego#L79[Source, window="_blank"]
4040

4141
[#required_tasks__required_tasks_list_present]
4242
=== link:#required_tasks__required_tasks_list_present[Required task list is present in rule data]
@@ -46,7 +46,7 @@ Confirm the `required-tasks` rule data was provided, since it's required by the
4646
* Rule type: [rule-type-indicator failure]#FAILURE#
4747
* FAILURE message: `The required tasks list is missing from the rule data`
4848
* Code: `required_tasks.required_tasks_list_present`
49-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/required_tasks/required_tasks.rego#L91[Source, window="_blank"]
49+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/required_tasks/required_tasks.rego#L111[Source, window="_blank"]
5050

5151
[#required_tasks__required_tasks_found]
5252
=== link:#required_tasks__required_tasks_found[Required tasks found in pipeline definition]
@@ -56,4 +56,4 @@ Produce a warning if a list of current or future required tasks does not exist i
5656
* Rule type: [rule-type-indicator warning]#WARNING#
5757
* WARNING message: `Required tasks do not exist for pipeline %q`
5858
* Code: `required_tasks.required_tasks_found`
59-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/required_tasks/required_tasks.rego#L16[Source, window="_blank"]
59+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/required_tasks/required_tasks.rego#L36[Source, window="_blank"]

antora/docs/modules/ROOT/pages/packages/pipeline_task_bundle.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Confirm the `trusted_tasks` rule data was provided, since it's required by the p
1616
* Rule type: [rule-type-indicator failure]#FAILURE#
1717
* FAILURE message: `Missing required trusted_tasks data`
1818
* Code: `task_bundle.missing_required_data`
19-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/task_bundle/task_bundle.rego#L98[Source, window="_blank"]
19+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/task_bundle/task_bundle.rego#L118[Source, window="_blank"]
2020

2121
[#task_bundle__untrusted_task_bundle]
2222
=== link:#task_bundle__untrusted_task_bundle[Task bundle is not trusted]
@@ -26,7 +26,7 @@ For each Task in the Pipeline definition, check if the Tekton Bundle used is a t
2626
* Rule type: [rule-type-indicator failure]#FAILURE#
2727
* FAILURE message: `Pipeline task '%s' uses an untrusted task bundle '%s'`
2828
* Code: `task_bundle.untrusted_task_bundle`
29-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/task_bundle/task_bundle.rego#L83[Source, window="_blank"]
29+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/task_bundle/task_bundle.rego#L103[Source, window="_blank"]
3030

3131
[#task_bundle__out_of_date_task_bundle]
3232
=== link:#task_bundle__out_of_date_task_bundle[Task bundle is out of date]
@@ -36,7 +36,7 @@ For each Task in the Pipeline definition, check if the Tekton Bundle used is the
3636
* Rule type: [rule-type-indicator warning]#WARNING#
3737
* WARNING message: `Pipeline task '%s' uses an out of date task bundle '%s', new version of the Task must be used before %s`
3838
* Code: `task_bundle.out_of_date_task_bundle`
39-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/task_bundle/task_bundle.rego#L34[Source, window="_blank"]
39+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/task_bundle/task_bundle.rego#L54[Source, window="_blank"]
4040

4141
[#task_bundle__empty_task_bundle_reference]
4242
=== link:#task_bundle__empty_task_bundle_reference[Task bundle reference is empty]
@@ -46,7 +46,7 @@ Check that a valid task bundle reference is being used.
4646
* Rule type: [rule-type-indicator failure]#FAILURE#
4747
* FAILURE message: `Pipeline task '%s' uses an empty bundle image reference`
4848
* Code: `task_bundle.empty_task_bundle_reference`
49-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/task_bundle/task_bundle.rego#L70[Source, window="_blank"]
49+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/task_bundle/task_bundle.rego#L90[Source, window="_blank"]
5050

5151
[#task_bundle__disallowed_task_reference]
5252
=== link:#task_bundle__disallowed_task_reference[Task bundle was not used or is not defined]
@@ -56,7 +56,7 @@ Check for the existence of a task bundle. This rule will fail if the task is not
5656
* Rule type: [rule-type-indicator failure]#FAILURE#
5757
* FAILURE message: `Pipeline task '%s' does not contain a bundle reference`
5858
* Code: `task_bundle.disallowed_task_reference`
59-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/task_bundle/task_bundle.rego#L56[Source, window="_blank"]
59+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/task_bundle/task_bundle.rego#L76[Source, window="_blank"]
6060

6161
[#task_bundle__unpinned_task_bundle]
6262
=== link:#task_bundle__unpinned_task_bundle[Unpinned task bundle reference]
@@ -66,4 +66,4 @@ Check if the Tekton Bundle used for the Tasks in the Pipeline definition is pinn
6666
* Rule type: [rule-type-indicator warning]#WARNING#
6767
* WARNING message: `Pipeline task '%s' uses an unpinned task bundle reference '%s'`
6868
* Code: `task_bundle.unpinned_task_bundle`
69-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/task_bundle/task_bundle.rego#L20[Source, window="_blank"]
69+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/pipeline/task_bundle/task_bundle.rego#L40[Source, window="_blank"]

antora/docs/modules/ROOT/pages/packages/release_slsa_build_scripted_build.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Verify that the predicate.buildConfig.tasks.steps attribute for the task respons
2020
* Rule type: [rule-type-indicator failure]#FAILURE#
2121
* FAILURE message: `Build task %q does not contain any steps`
2222
* Code: `slsa_build_scripted_build.build_script_used`
23-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/slsa_build_scripted_build/slsa_build_scripted_build.rego#L21[Source, window="_blank"]
23+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/slsa_build_scripted_build/slsa_build_scripted_build.rego#L24[Source, window="_blank"]
2424

2525
[#slsa_build_scripted_build__build_task_image_results_found]
2626
=== link:#slsa_build_scripted_build__build_task_image_results_found[Build task set image digest and url task results]
@@ -32,7 +32,7 @@ Confirm that a build task exists and it has the expected IMAGE_DIGEST and IMAGE_
3232
* Rule type: [rule-type-indicator failure]#FAILURE#
3333
* FAILURE message: `Build task not found`
3434
* Code: `slsa_build_scripted_build.build_task_image_results_found`
35-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/slsa_build_scripted_build/slsa_build_scripted_build.rego#L48[Source, window="_blank"]
35+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/slsa_build_scripted_build/slsa_build_scripted_build.rego#L51[Source, window="_blank"]
3636

3737
[#slsa_build_scripted_build__image_built_by_trusted_task]
3838
=== link:#slsa_build_scripted_build__image_built_by_trusted_task[Image built by trusted Task]
@@ -44,7 +44,7 @@ Verify the digest of the image being validated is reported by a trusted Task in
4444
* Rule type: [rule-type-indicator failure]#FAILURE#
4545
* FAILURE message: `Image %q not built by a trusted task: %s`
4646
* Code: `slsa_build_scripted_build.image_built_by_trusted_task`
47-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/slsa_build_scripted_build/slsa_build_scripted_build.rego#L107[Source, window="_blank"]
47+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/slsa_build_scripted_build/slsa_build_scripted_build.rego#L110[Source, window="_blank"]
4848

4949
[#slsa_build_scripted_build__subject_build_task_matches]
5050
=== link:#slsa_build_scripted_build__subject_build_task_matches[Provenance subject matches build task image result]
@@ -56,4 +56,4 @@ Verify the subject of the attestations matches the IMAGE_DIGEST and IMAGE_URL va
5656
* Rule type: [rule-type-indicator failure]#FAILURE#
5757
* FAILURE message: `The attestation subject, %q, does not match any of the images built`
5858
* Code: `slsa_build_scripted_build.subject_build_task_matches`
59-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/slsa_build_scripted_build/slsa_build_scripted_build.rego#L73[Source, window="_blank"]
59+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/slsa_build_scripted_build/slsa_build_scripted_build.rego#L76[Source, window="_blank"]

antora/docs/modules/ROOT/pages/packages/release_tasks.adoc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Ensure that the all required tasks are resolved from trusted tasks.
1818
* Rule type: [rule-type-indicator failure]#FAILURE#
1919
* FAILURE message: `%s is required and present but not from a trusted task`
2020
* Code: `tasks.required_untrusted_task_found`
21-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/tasks/tasks.rego#L164[Source, window="_blank"]
21+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/tasks/tasks.rego#L167[Source, window="_blank"]
2222

2323
[#tasks__required_tasks_found]
2424
=== link:#tasks__required_tasks_found[All required tasks were included in the pipeline]
@@ -30,7 +30,7 @@ Ensure that the set of required tasks are included in the PipelineRun attestatio
3030
* Rule type: [rule-type-indicator failure]#FAILURE#
3131
* FAILURE message: `%s is missing`
3232
* Code: `tasks.required_tasks_found`
33-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/tasks/tasks.rego#L140[Source, window="_blank"]
33+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/tasks/tasks.rego#L143[Source, window="_blank"]
3434

3535
[#tasks__data_provided]
3636
=== link:#tasks__data_provided[Data provided]
@@ -42,7 +42,7 @@ Confirm the expected data keys have been provided in the expected format. The ke
4242
* Rule type: [rule-type-indicator failure]#FAILURE#
4343
* FAILURE message: `%s`
4444
* Code: `tasks.data_provided`
45-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/tasks/tasks.rego#L291[Source, window="_blank"]
45+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/tasks/tasks.rego#L294[Source, window="_blank"]
4646

4747
[#tasks__future_required_tasks_found]
4848
=== link:#tasks__future_required_tasks_found[Future required tasks were found]
@@ -54,7 +54,7 @@ Produce a warning when a task that will be required in the future was not includ
5454
* Rule type: [rule-type-indicator warning]#WARNING#
5555
* WARNING message: `%s is missing and will be required on %s`
5656
* Code: `tasks.future_required_tasks_found`
57-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/tasks/tasks.rego#L55[Source, window="_blank"]
57+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/tasks/tasks.rego#L58[Source, window="_blank"]
5858

5959
[#tasks__pinned_task_refs]
6060
=== link:#tasks__pinned_task_refs[Pinned Task references]
@@ -66,7 +66,7 @@ Ensure that all Tasks in the SLSA Provenance attestation use an immuntable refer
6666
* Rule type: [rule-type-indicator failure]#FAILURE#
6767
* FAILURE message: `Task %s is used by pipeline task %s via an unpinned reference.`
6868
* Code: `tasks.pinned_task_refs`
69-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/tasks/tasks.rego#L225[Source, window="_blank"]
69+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/tasks/tasks.rego#L228[Source, window="_blank"]
7070

7171
[#tasks__pipeline_has_tasks]
7272
=== link:#tasks__pipeline_has_tasks[Pipeline run includes at least one task]
@@ -78,7 +78,7 @@ Ensure that at least one Task is present in the PipelineRun attestation.
7878
* Rule type: [rule-type-indicator failure]#FAILURE#
7979
* FAILURE message: `No tasks found in PipelineRun attestation`
8080
* Code: `tasks.pipeline_has_tasks`
81-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/tasks/tasks.rego#L85[Source, window="_blank"]
81+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/tasks/tasks.rego#L88[Source, window="_blank"]
8282

8383
[#tasks__pipeline_required_tasks_list_provided]
8484
=== link:#tasks__pipeline_required_tasks_list_provided[Required tasks list for pipeline was provided]
@@ -90,7 +90,7 @@ Produce a warning if the required tasks list rule data was not provided.
9090
* Rule type: [rule-type-indicator warning]#WARNING#
9191
* WARNING message: `Required tasks do not exist for pipeline`
9292
* Code: `tasks.pipeline_required_tasks_list_provided`
93-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/tasks/tasks.rego#L34[Source, window="_blank"]
93+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/tasks/tasks.rego#L37[Source, window="_blank"]
9494

9595
[#tasks__required_tasks_list_provided]
9696
=== link:#tasks__required_tasks_list_provided[Required tasks list was provided]
@@ -102,7 +102,7 @@ Confirm the `required-tasks` rule data was provided, since it's required by the
102102
* Rule type: [rule-type-indicator failure]#FAILURE#
103103
* FAILURE message: `Missing required required-tasks data`
104104
* Code: `tasks.required_tasks_list_provided`
105-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/tasks/tasks.rego#L201[Source, window="_blank"]
105+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/tasks/tasks.rego#L204[Source, window="_blank"]
106106

107107
[#tasks__successful_pipeline_tasks]
108108
=== link:#tasks__successful_pipeline_tasks[Successful pipeline tasks]
@@ -114,7 +114,7 @@ Ensure that all of the Tasks in the Pipeline completed successfully. Note that s
114114
* Rule type: [rule-type-indicator failure]#FAILURE#
115115
* FAILURE message: `Pipeline task %q did not complete successfully, %q`
116116
* Code: `tasks.successful_pipeline_tasks`
117-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/tasks/tasks.rego#L110[Source, window="_blank"]
117+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/tasks/tasks.rego#L113[Source, window="_blank"]
118118

119119
[#tasks__unsupported]
120120
=== link:#tasks__unsupported[Task version unsupported]
@@ -124,4 +124,4 @@ The Tekton Task used is or will be unsupported. The Task is annotated with `buil
124124
* Rule type: [rule-type-indicator failure]#FAILURE#
125125
* FAILURE message: `Task %q is used by pipeline task %q is or will be unsupported as of %s. %s`
126126
* Code: `tasks.unsupported`
127-
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/tasks/tasks.rego#L252[Source, window="_blank"]
127+
* https://github.com/conforma/policy/blob/{page-origin-refhash}/policy/release/tasks/tasks.rego#L255[Source, window="_blank"]

0 commit comments

Comments
 (0)