image: add static (per-CSP) measurements during "measurement envelope"

This logic was previously performed in a GitHub Actions workflow
using yq.
Since every step should now be performed in Bazel, this now needs to happen here.
This commit is contained in:
Malte Poll 2024-01-04 16:39:45 +01:00
parent f7b22f3705
commit 181b8f64d2
3 changed files with 138 additions and 0 deletions

View file

@ -66,6 +66,11 @@ func runEnvelopeMeasurements(cmd *cobra.Command, _ []string) error {
return fmt.Errorf("enveloping measurements: reading input file: %w", err)
}
measuremnt.Measurements, err = measurements.ApplyOverrides(measuremnt.Measurements, flags.csp, flags.attestationVariant)
if err != nil {
return fmt.Errorf("enveloping measurements: overriding static measurements: %w", err)
}
enveloped := measurements.ImageMeasurementsV2{
Ref: flags.version.Ref(),
Stream: flags.version.Stream(),