Skip to content

Commit 536bb60

Browse files
committed
fix(policies): prevent binary content parsing for HELM_CHART materials
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
1 parent 33ca7a8 commit 536bb60

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pkg/attestation/crafter/api/attestation/v1/crafting_state.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ func (m *Attestation_Material) GetEvaluableContent(value string) ([]byte, error)
9494
}
9595

9696
if artifact != nil {
97-
if m.InlineCas {
97+
if m.InlineCas &&
98+
m.MaterialType != v1.CraftingSchema_Material_HELM_CHART &&
99+
m.MaterialType != v1.CraftingSchema_Material_JUNIT_XML {
98100
rawMaterial = artifact.GetContent()
99101
} else if value == "" {
100102
return nil, errors.New("artifact path required")

0 commit comments

Comments
 (0)