RedHatProductSecurity / trestle-bot

A workflow automation tool for `compliance-trestle`

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Default values for required_sections and allowed_sections should be set to None

gvauter opened this issue · comments

Describe the bug
Currently parameters passed to the assemble_profile_markdown method are being initialized as empty strings. This is causing unwanted behavior in compliance-trestle which performs an if is None check to validate the list of allowed sections. To resolve this issue, the default values should be set to None.

To Reproduce
Steps to reproduce the behavior:

  1. Create or modify the profile markdown content.
  2. Run the autosync command with the oscal_model="profile" parameter
  3. See error TrestleError(f'Profile has alter with name {bad_part.name} not in allowed sections.') raised by compliance-trestle

Expected behavior
If required_sections or allowed_sections are not set they should default to None.