diff --git a/docs/manual/developer/03_creating_content.md b/docs/manual/developer/03_creating_content.md index 646e6371287..488240181f2 100644 --- a/docs/manual/developer/03_creating_content.md +++ b/docs/manual/developer/03_creating_content.md @@ -977,7 +977,7 @@ original_title: used as a reference for policies not yet available in English source: a link to the original policy, eg. a URL of a PDF document controls_dir: a directory containing files representing controls that will be imported into this policy reference_type: Reference type represented by control IDs in this policy. -product: product ID, set if the policy is specific to a single product. +product: list of product IDs, set if the policy is specific to a single or number of products. levels: a list of levels, the first one is default - id: level ID (required key) inherits_from: a list of IDs of levels inheriting from diff --git a/ssg/controls.py b/ssg/controls.py index c487d3f23ee..9471276c79b 100644 --- a/ssg/controls.py +++ b/ssg/controls.py @@ -349,7 +349,11 @@ def load(self): self.title = ssg.utils.required_key(yaml_contents, "title") self.source = yaml_contents.get("source", "") self.reference_type = yaml_contents.get("reference_type", None) - self.product = yaml_contents.get("product", None) + yaml_product = yaml_contents.get("product", None) + if isinstance(yaml_product, list): + self.product = yaml_product + elif yaml_product is not None: + self.product = [yaml_product] default_level_dict = {"id": "default"} level_list = yaml_contents.get("levels", [default_level_dict])