in-toto / attestation

in-toto Attestation Framework
Other
231 stars 59 forks source link

Replace per-language proto validators with custom validators #232

Open marcelamelara opened 1 year ago

marcelamelara commented 1 year ago

Currently, we implement separate validator functions for the Statement and predicate layer language bindings. In the future, we may be able to replace these per-language validators with something more portable.

Opening this issue to not lose track of this option.

Originally posted by @marcelamelara in https://github.com/in-toto/attestation/issues/220#issuecomment-1548577499

marcelamelara commented 1 month ago

Update: Looks like this is a possible tool we could use for this https://github.com/bufbuild/protovalidate, which uses CEL rules for custom protobuf validation.

@in-toto/attestation-maintainers thoughts on switching to something like this, rather than implementing language specific validators (as we do now)?