diff --git a/tuf/api/metadata.py b/tuf/api/metadata.py index 6c8b307161..23ed1fff43 100644 --- a/tuf/api/metadata.py +++ b/tuf/api/metadata.py @@ -506,6 +506,8 @@ def __init__( f"keyids should be a list of unique strings," f" instead got {keyids}" ) + if threshold < 1: + raise ValueError("threshold should be at least 1!") self.keyids = keyids_set self.threshold = threshold self.unrecognized_fields: Mapping[str, Any] = unrecognized_fields or {}