Skip to content

Error decoding attestations with INLINE binary data #2065

@jiparis

Description

@jiparis

When using binary data, the value field is interpreted as a String, so the GRPC marshaler complains about invalid UTF-8 data:

➜  head -c 10 /dev/urandom > random.bin
➜  chainloop att add --value random.bin
INF material kind detected kind=ARTIFACT
INF material added to attestation
┌──────────┬─────────────────────────────────────────────────────────────────────────┐
│ Name     │ material-1747928434860035000                                            │
├──────────┼─────────────────────────────────────────────────────────────────────────┤
│ Type     │ ARTIFACT                                                                │
├──────────┼─────────────────────────────────────────────────────────────────────────┤
│ Required │ No                                                                      │
├──────────┼─────────────────────────────────────────────────────────────────────────┤
│ Value    │ random.bin                                                              │
├──────────┼─────────────────────────────────────────────────────────────────────────┤
│ Digest   │ sha256:f12b89ec8f19b3f2ed7e86eb88ee0063d6ef1f9aca9f69dc7a270537bca9a45e │
└──────────┴─────────────────────────────────────────────────────────────────────────┘
➜ chainloop att push
INF push completed
┌───────────────────────────┬─────────────────────────────────────────────────────────────────────────┐
│ Initialized At            │ 22 May 25 15:37 UTC                                                     │
├───────────────────────────┼─────────────────────────────────────────────────────────────────────────┤
│ Attestation ID            │ 4df0fb42-c8d9-49cd-9e75-fa73c4eaf73c                                    │
│ Digest                    │ sha256:d83bae2cdc3bff4dc2ab7d6caad0e1ac045e41bf5a9cf88a0aafce0226d1c51b │
│ Organization              │ my-org                                                                  │
│ Name                      │ mywf                                                                    │
│ Project                   │ myproject                                                               │
│ Version                   │ v1.6.0 (prerelease)                                                     │
│ Contract                  │ myproject-mywf (revision 101)                                           │
│ Policy violation strategy │ ADVISORY                                                                │
└───────────────────────────┴─────────────────────────────────────────────────────────────────────────┘
┌────────────────────────────────────────────────────────────────────────────────────┐
│ Materials                                                                          │
├──────────┬─────────────────────────────────────────────────────────────────────────┤
│ Name     │ material-1747928434860035000                                            │
│ Type     │ ARTIFACT                                                                │
│ Set      │ Yes                                                                     │
│ Required │ No                                                                      │
│ Value    │ random.bin                                                              │
│ Digest   │ sha256:f12b89ec8f19b3f2ed7e86eb88ee0063d6ef1f9aca9f69dc7a270537bca9a45e │
└──────────┴─────────────────────────────────────────────────────────────────────────┘
➜ chainloop wf run describe --id 4df0fb42-c8d9-49cd-9e75-fa73c4eaf73c
DBG using config file path="/Users/jiparis/Library/Application Support/chainloop/config.devel.toml"
WRN API contacted in insecure mode
ERR grpc: error while marshaling: string field contains invalid UTF-8
exit status 1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions