Closed stijnpieters closed 2 months ago
resolved by editing scripts as follows: prep_cis.py
"""
simple script to transform the official CIS Excel file to another Excel file for CISO assistant framework conversion tool
"""
import openpyxl
import sys
import re
import argparse
from openpyxl.styles import numbers
parser = argparse.ArgumentParser(
prog="convert_cis",
description="convert CIS controls offical Excel file to CISO Assistant Excel file",
)
parser.add_argument("filename", help="name of CIS controls Excel file")
parser.add_argument("packager", help="name of packager entity")
**parser.add_argument("intermediate", help="name of intermediate Excel file")**
args = parser.parse_args()
input_file_name = args.filename
packager = args.packager
**output_file_name = args.intermediate**
print("parsing", input_file_name)
...
convert_cis.py
file="CIS_Controls_Version_8.xlsx"
packager="personal"
intermediate="cis/cis-controls-v8.xlsx"
python cis/prep_cis.py $file $packager $intermediate
python convert_library.py cis/cis-controls-v8.xlsx
echo "Resulting file is available at cis/cis-controls-v8.yaml"
convert_library.py
...
name = row[header["name"]].value if "name" in header else None
if name and len(name) > 150:
print("Name too long:", ref_id, name)
exit(1)
description = (
row[header["description"]].value
if "description" in header
else None
)
...
files in attachment: ciso-assistant.zip
Can someone create a PR for this?
Describe the bug Wrong paths in convert_cis.py cause intermediate file to be created in wrong directory and script to fail:
This can be easily resolved by editing the scripts in a few ways (further explained in comments).
After edits, following error also occurs:
To Reproduce Steps to reproduce the behavior:
Expected behavior In the cis subfolder, cis-controls-v8.yaml should be created as stated in the command output.
Environment (please complete the following information):