The analysis of the security advisory and the associated patch commit f1ad3ee952313be5d74a49d67ba0aa8d0d5e351f clearly indicates that the vulnerability is located in the Exec method of the VerifyBlobAttestationCommand struct. The vulnerability has two facets, both of which are addressed in the patch within this single function.
-
Improper Error Handling (Old Bundles/Detached Signatures): The original code had a flawed conditional check: if b, gotPredicateType, err := policy.AttestationToPayloadJSON(...); b == nil && err == nil. This logic ignored any non-nil err returned by AttestationToPayloadJSON (which occurs with malformed payloads), leading to a false "Verified OK" result. The patch corrects this by checking for err != nil immediately after the function call.
-
Missing Validation (New Bundles): For new-format bundles, the code path completely lacked a call to policy.AttestationToPayloadJSON to validate the predicate type. The patch adds the necessary logic to extract the attestation from the bundle and perform this validation, preventing the acceptance of attestations with mismatched or malformed types.
Therefore, the (*VerifyBlobAttestationCommand).Exec function is the precise location of the vulnerability. During exploitation, this function would be on the call stack as it processes the malicious attestation, making it the key runtime indicator.