oscal-compass / compliance-trestle

An opinionated tooling platform for managing compliance as code, using continuous integration and NIST's OSCAL standard.
https://oscal-compass.github.io/compliance-trestle
Apache License 2.0
168 stars 61 forks source link

task csv-to-oscal-cd should allow any case for headings. #1461

Closed degenaro closed 5 months ago

degenaro commented 1 year ago

Issue description / feature objectives

Different heading case should be tolerated. For example $$Control_Id_List, $$control_id_list, $$Control_id_list, etc. should all be allowed.

Caveats / Assumptions

N/A

Completion Criteria

Code to support and corresponding tests delivered.

degenaro commented 5 months ago

Current code snippet:

COMPONENT_DESCRIPTION = 'Component_Description' component_description = self._csv_mgr.get_value(rule_key, COMPONENT_DESCRIPTION)

If the column heading in the .csv is Component_Description a match will occur. The change request is to make the matching to be case insensitive, so that a .csv with a column heading component_description will also match. In fact any casing, even component_DeScRiPtIoN should match.

Please update test cases to prove case insensitivity.