You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GetEvaluableContent fails on binary material content #2963
GetEvaluableContent in pkg/attestation/crafter/api/attestation/v1/crafting_state.go attempts to JSON-decode all material content, which fails for binary materials with errors like:
ERR adding material: error applying policy groups to material: failed to parse input: invalid character '\x7f' looking for beginning of value
crafting_state.go:158-159 → json.Decoder.Decode() fails on non-JSON content
Expected behavior
GetEvaluableContent should detect binary or non-JSON content and either skip policy evaluation for those materials or handle them gracefully instead of returning an error.
Current behavior
Any material with binary content (e.g., containing control characters like \x7f) causes policy group evaluation to fail, blocking the attestation add command.
Activity
jiparis commentedon Mar 30, 2026
Bug introduced in #2954 (GetEvaluableContent is called no matter of it being evaluated)
fix(policies): skip GetEvaluableContent when no policies apply to mat…