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

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.

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

164 changes: 81 additions & 83 deletions app/controlplane/api/workflowcontract/v1/crafting_schema.pb.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,8 @@ message PolicySpecV2 {
}

// if set, it will match any material supported by Chainloop
// except those not having a direct schema (STRING, ARTIFACT, EVIDENCE), since their format cannot be guessed by the crafter.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not sure if ARTIFACT should be also permitted since ARTIFACT is at the same level but opposite than EVIDENCE.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We want to shift responsibility of handling EVIDENCE to the user because there's no way to verify schema at this point, but at the same time there's no way to validate what the ARTIFACT is, in that way they are similar.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@jiparis just give it a review, I am ok either way, thanks

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This can be a long discussion. I think that we are giving Evidence and Artifact a semantic that is orthogonal to material kinds. For example, following that convention, a CycloneDX material can be and Evidence at the same time.

Since we are not yet in that stage of the discussion (but I think we will soon), I would just allow EVIDENCE at this point (and maybe STRING), clearly stating in the docs that Artifact is not supported because it's usually an arbitrary format (a binary, a tar.gz ...), whereas Evidences are only supported if they have a JSON format.

// CONTAINER, HELM_CHART are also excluded, but we might implement custom policies for them in the future.
CraftingSchema.Material.MaterialType kind = 3 [(buf.validate.field).enum = {
not_in: [
1,
3,
11
]
not_in: [3]
}];
}

Expand Down
Loading