Skip to content

Commit

Permalink
Refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
ab-smith committed Nov 30, 2024
1 parent e352039 commit 949b688
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions cli/RA_sample.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ref_id;assets;threats;name;description;existing_controls;current_impact;current_proba;current_level;additional_controls;residual_impact;residual_proba;residual_level;treatment
R.1;dsafa;Data Encrypted for Impact;Ransomware;;ISMS Scope document,Statement of Applicabilty document;Significant;Likely;Low;Risk management policy,Organization overview document,Main policy,Competency matrix;Critical;Very likely;High;open
R.2;;System Shutdown/Reboot;Unavailability;;Information security awareness and traning policy;Significant;Very likely;Medium;Management review plan document,Main policy,ISMS Scope document,Responsibility matrix;Important;Unlikely;Medium;open
R.3;dsasfad;Scheduled Task,Cloud Administration Command;Insider threats;;;Important;Likely;Medium;;--;--;--;open
15 changes: 11 additions & 4 deletions cli/clica.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,18 @@ def import_risk_assessment(file, folder, project, name, matrix, create_all):
additional_controls = get_unique_parsed_values(df, "additional_controls")
batch_create("applied-controls", additional_controls, folder_id)

# sequential post to create the assets if any

# sequential post to create the controls if any

df = df.fillna("")
# sequential post over the scenarios
for scenario in df.itertuples():
print(
scenario.ref_id,
scenario.name,
scenario.description,
scenario.current_impact,
scenario.current_proba,
scenario.residual_impact,
scenario.residual_proba,
)


@click.command()
Expand Down

0 comments on commit 949b688

Please sign in to comment.