From 393fd8531ab1fa4d657951ecdd7ccde9c9185a74 Mon Sep 17 00:00:00 2001 From: Jennifer Power Date: Wed, 20 Mar 2024 10:12:38 -0400 Subject: [PATCH] fix: adds OSCAL validated component definition types to create-cd (#191) * fix: adds OSCAL validated component definition types to create-cd Signed-off-by: Jennifer Power * fix: updates "service" line to fix missing comma Signed-off-by: Jennifer Power --------- Signed-off-by: Jennifer Power --- actions/create-cd/README.md | 2 +- actions/create-cd/action.yml | 2 +- trestlebot/entrypoints/create_cd.py | 14 +++++++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/actions/create-cd/README.md b/actions/create-cd/README.md index f71f898b..a15d1a8b 100644 --- a/actions/create-cd/README.md +++ b/actions/create-cd/README.md @@ -29,7 +29,7 @@ name: Example Workflow | profile_name | Name of the Trestle profile to use for the component definition | None | True | | component_definition_name | Name of the component definition to create | None | True | | component_title | Name of the component to create | None | True | -| component_type | Type of the component to create | service | False | +| component_type | Type of the component to create. Values can be interconnection, software, hardware, service, policy, physical, process-procedure, plan, guidance, standard, or validation | service | False | | component_description | Description of the component to create | None | True | | filter_by_profile | Name of the profile in the workspace to filter controls by | None | False | | github_token | GitHub token used to make authenticated API requests | None | False | diff --git a/actions/create-cd/action.yml b/actions/create-cd/action.yml index 55b54127..da2034dd 100644 --- a/actions/create-cd/action.yml +++ b/actions/create-cd/action.yml @@ -16,7 +16,7 @@ inputs: description: Name of the component to create required: true component_type: - description: Type of the component to create + description: Type of the component to create. Values can be interconnection, software, hardware, service, policy, physical, process-procedure, plan, guidance, standard, or validation required: false default: "service" component_description: diff --git a/trestlebot/entrypoints/create_cd.py b/trestlebot/entrypoints/create_cd.py index e45dee70..e620ab29 100644 --- a/trestlebot/entrypoints/create_cd.py +++ b/trestlebot/entrypoints/create_cd.py @@ -69,7 +69,19 @@ def setup_create_cd_arguments(self) -> None: "--component-definition-type", required=False, type=str, - choices=["service", "validation"], + choices=[ + "interconnection", + "service", + "software", + "hardware", + "policy", + "physical", + "process-procedure", + "plan", + "guidance", + "standard", + "validation", + ], default="service", help="Type of component definition", )