Partially disable rule mode on parsing error for scan execution policies

Why are we doing this work

  • currently when there is a yaml parsing error, the entire rule mode disables, which could be overkill (e.g. if the parsing error is because of a rule, then the action section should not have to be disabled)

Non-functional requirements

  • Documentation:
  • Feature flag:
  • Performance:
  • Testing:

Implementation plan

  • investigate/create POC compartmentalizing the disabling of rule mode on a parsing error so that not all of rule mode is disabled when only one section has an issue
    • modify from_yaml methods for all policy types (e.g. scan_result, scan_execution, pipeline_execution and any other working policy) so that the errors provide the section/s that broke.
      • current error when parsing fails { error: true }
      • potential future error when parsing fails { action: false, rule: true, settings: false } where true indicates there was an error and the component should be disabled so that we can swap out the checks in the component :disabled="hasParsingError" for :disabled="parsingError[component]
  • discuss POC with group and implement if agreed upon
  • implement for scan execution policy

Verification steps

Edited by Alexander Turinske