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
20 changes: 12 additions & 8 deletions app/cli/internal/action/workflow_run_describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ type WorkflowRunAttestationItem struct {
type Material struct {
Name string `json:"name"`
// filename, container image name, string value, ...
Value string `json:"value"`
Hash string `json:"hash"`
Type string `json:"type"`
Annotations []*Annotation `json:"annotations,omitempty"`
Value string `json:"value"`
Hash string `json:"hash"`
Type string `json:"type"`
Annotations []*Annotation `json:"annotations,omitempty"`
UploadedToCAS bool `json:"uploadedToCAS,omitempty"`
EmbeddedInline bool `json:"embeddedInline,omitempty"`
}

type EnvVar struct {
Expand Down Expand Up @@ -163,10 +165,12 @@ func (action *WorkflowRunDescribe) Run(runID string, verify bool, publicKey stri

func materialPBToAction(in *pb.AttestationItem_Material) *Material {
m := &Material{
Name: in.Name,
Value: in.Value,
Type: in.Type,
Hash: in.Hash,
Name: in.Name,
Value: in.Value,
Type: in.Type,
Hash: in.Hash,
UploadedToCAS: in.UploadedToCas,
EmbeddedInline: in.EmbeddedInline,
}

// append annotations sorted
Expand Down
225 changes: 124 additions & 101 deletions app/controlplane/api/controlplane/v1/response_messages.pb.go

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions app/controlplane/api/controlplane/v1/response_messages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ message AttestationItem {
string type = 3;
map<string, string> annotations = 4;
string hash = 5;
// it's been uploaded to an actual CAS backend
bool uploaded_to_cas = 6;
// the content instead if inline
bool embedded_inline = 7;
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/controlplane/api/controlplane/v1/status_http.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions app/controlplane/internal/service/attestation.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,10 +387,12 @@ func extractMaterials(in []*chainloop.NormalizedMaterial) ([]*cpAPI.AttestationI
res := make([]*cpAPI.AttestationItem_Material, 0, len(in))
for _, m := range in {
materialItem := &cpAPI.AttestationItem_Material{
Name: m.Name,
Type: m.Type,
Annotations: m.Annotations,
Value: m.Value,
Name: m.Name,
Type: m.Type,
Annotations: m.Annotations,
Value: m.Value,
UploadedToCas: m.UploadedToCAS,
EmbeddedInline: m.EmbeddedInline,
}

if m.Hash != nil {
Expand Down