Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
"name": "index.docker.io/bitnami/nginx",
"digest": {
"sha256": "fbd9335f55d83d8aaf9ab1a539b0f2a87b444e8c54f34c9a1ca9d7df15605db4"
},
"annotations": {
"chainloop.material.name": "image",
"chainloop.material.type": "CONTAINER_IMAGE"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@
"sha256": "b403d1bb2b7739495df20f6d3838956333b04a66bc81d43bc7c64cee1433b604"
}
},
{
"name": "index.docker.io/bitnami/nginx",
"digest": {
{
"name": "index.docker.io/bitnami/nginx",
"digest": {
"sha256": "580ac09da7771920dfd0c214964e7bfe4c27903bcbe075769a4044a67c9a390a"
}
},
"annotations": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[not blocking / just a consideration]
Is it expected to have a JSON key in plural which value is not an array? In this case, it's annotations, meaning that 1 annotation is <key, value> in that hash.

Copy link
Member Author

@migmartri migmartri Oct 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's part of the in-toto spec upstream.

In fact, it seems that a key-value pair is what makes indeed one annotation.

"chainloop.material.name": "skynet-control-plane",
"chainloop.material.type": "CONTAINER_IMAGE"
}
}
],
"predicate_type": "chainloop.dev/attestation/v0.2",
Expand Down
5 changes: 3 additions & 2 deletions internal/attestation/renderer/chainloop/v02.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ func (r *RendererV02) subject() ([]*intoto.ResourceDescriptor, error) {
for _, m := range normalizedMaterials {
if m.Digest != nil {
subject = append(subject, &intoto.ResourceDescriptor{
Name: m.Name,
Digest: m.Digest,
Name: m.Name,
Digest: m.Digest,
Annotations: m.Annotations,
})
}
}
Expand Down