diff --git a/CIS_controls/README.md b/CIS_controls/README.md index 3cadb2c..739d26c 100644 --- a/CIS_controls/README.md +++ b/CIS_controls/README.md @@ -1,14 +1,36 @@ # CIS Controls conversion script -The Centre for Internet Security (CIS) produce a number of cross industry standards for IT security including their [platform specific benchmarks](https://www.cisecurity.org/cis-benchmarks/) and a suite of [controls](https://www.cisecurity.org/controls/). This demo converts a spreadsheet of those controls into a a catalog and three profiles. +The Centre for Internet Security (CIS) produce a number of cross industry standards for IT security including their [platform specific benchmarks](https://www.cisecurity.org/cis-benchmarks/) and a suite of [controls](https://www.cisecurity.org/controls/). This demo converts a spreadsheet of those controls into a catalog and three profiles. -## Using this demonstration +## Prerequisites -Download the CIS controls excel spreadsheet to your chosen location. Run the script by +Download the [CIS controls Excel spreadsheet](https://www.cisecurity.org/controls/) to your chosen location. -1. Running `make install` to ensure all dependencies are installed. +Download this repo -1. Run the script by `python create_cis_catalogs_profiles.py -i path_to_cis_spreadsheet.xlsx -o output_directory_defaults_to_cwd` +``` +> cd +> mkdir git +> cd git +> git clone https://github.com/oscal-compass/compliance-trestle-demos.git +``` + +Install compliance trestle, ideally in a python virtual environment. + +``` +> cd +> python -m venv venv.compliance-trestle-demos +> source venv.compliance-trestle-demos/bin/activate +> cd git/compliance-trestle-demos +> make install +``` + +## Running the demo + +``` +> cd CIS_controls +> python create_cis_catalogs_profiles.py -i path_to_cis_spreadsheet.xlsx -o output_directory_defaults_to_cwd +``` In the chosen output directory 1 catalog and 3 profiles will be created. diff --git a/CIS_controls/create_cis_catalogs_profiles.py b/CIS_controls/create_cis_catalogs_profiles.py index 91ecdee..da579ff 100644 --- a/CIS_controls/create_cis_catalogs_profiles.py +++ b/CIS_controls/create_cis_catalogs_profiles.py @@ -135,7 +135,7 @@ def run(input_xls: pathlib.Path, output_directory: pathlib.Path, cis_version: st def write_profile(profile: ospro.Profile, control_list: List[str], path: pathlib.Path): """Fill in control list and write the profile.""" include_controls: List[str] = [] - selector = ospro.SelectControlById() + selector = ospro.SelectControl() selector.with_ids = control_list include_controls.append(selector) profile.imports[0].include_controls = include_controls