-
Notifications
You must be signed in to change notification settings - Fork 86
Description
Hello,
I think I may be holding this wrong. In https://github.com/in-toto/attestation/blob/main/spec/v1/predicate.md it is said that the predicate itself can be missing:
plus an optional predicate JSON object containing additional, type-dependent parameters.
However, the Python constructor requires the predicate to be set:
def __init__(self, subjects: list, predicate_type: str, predicate: dict) -> None: |
For my (very test-y, WIP-y) use case I don't currently have anything to put in the predicate, so I pass {}
.
However, when I then do statement.validate()
, it fails to validate due to
attestation/python/in_toto_attestation/v1/statement.py
Lines 45 to 46 in fc43990
if len(self.pb.predicate) == 0: | |
raise ValueError("Predicate object required") |
Should we always have something for the predicate? I was thinking that if I am able to record the subjects and don't have any additional metadata for my custom predicate I should be able to skip having to pass in a predicate object.
Happy to update documentation or code, depending on what is the desired path forward.