From 1ffcd747186bdfaa628cba0c72db9e2d3cd5d9f4 Mon Sep 17 00:00:00 2001 From: Sara Thon Date: Thu, 23 Apr 2026 09:56:07 +0200 Subject: [PATCH] CFE-4637: Fix cfbs stacktrace when "provides" value is not object Ticket: CFE-4637 --- cfbs/cfbs_json.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cfbs/cfbs_json.py b/cfbs/cfbs_json.py index 042b905c..0454bd5d 100644 --- a/cfbs/cfbs_json.py +++ b/cfbs/cfbs_json.py @@ -188,6 +188,11 @@ def get_provides(self, added_by: Optional[str]): "missing required key 'provides' in module definition: %s" % pretty(self._data) ) + if not isinstance(self._data["provides"], dict): + raise CFBSValidationError( + "'provides' must be a JSON object (dict), not a list or other type in module definition: %s" + % pretty(self._data) + ) for k, v in self._data["provides"].items(): module = _construct_provided_module( k, v, self.url, self.url_commit, self.url_branch, added_by