Complete safety and transfer remediation verification
This commit is contained in:
@@ -41,6 +41,18 @@ func InspectExtractionEvidence(
|
||||
m *manifest.Manifest,
|
||||
configured map[string]ExtractionArtifactDefinition,
|
||||
input ExtractionInputIdentity,
|
||||
) ExtractionEvidence {
|
||||
return inspectExtractionEvidence(paths, m, configured, input, nil)
|
||||
}
|
||||
|
||||
// inspectExtractionEvidence can omit payload reads for outputs whose remote
|
||||
// declarations will be carried, while retaining bundle identity checks.
|
||||
func inspectExtractionEvidence(
|
||||
paths SessionPaths,
|
||||
m *manifest.Manifest,
|
||||
configured map[string]ExtractionArtifactDefinition,
|
||||
input ExtractionInputIdentity,
|
||||
omitPayload map[string]bool,
|
||||
) ExtractionEvidence {
|
||||
if m == nil || len(configured) == 0 {
|
||||
return ExtractionEvidence{State: ExtractionEvidenceAbsent, Reason: "extraction evidence is absent"}
|
||||
@@ -99,6 +111,10 @@ func InspectExtractionEvidence(
|
||||
if provenance == nil || provenance.System != "notarius" || provenance.RunID != "" || provenance.PipelineID != pipelineID || pipelineID != strings.TrimSpace(d.PipelineID) || provenance.ArtifactID != d.LaneID {
|
||||
return ExtractionEvidence{State: ExtractionEvidenceObsolete, Reason: "extract output lane or pipeline identity is incompatible"}
|
||||
}
|
||||
if omitPayload[out.SourceID] {
|
||||
seen[out.SourceID] = struct{}{}
|
||||
continue
|
||||
}
|
||||
state, reason, size := inspectExtractionPayload(root, out.LocalPath, out.Checksum)
|
||||
if state != ExtractionEvidenceValid {
|
||||
return ExtractionEvidence{State: state, Reason: reason}
|
||||
|
||||
Reference in New Issue
Block a user