Skip to content

Commit

Permalink
fix scenario script
Browse files Browse the repository at this point in the history
  • Loading branch information
AlteredCoder committed Sep 19, 2023
1 parent 29cd9c4 commit b789b31
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions scripts/scenario_taxonomy.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,22 +173,21 @@ def main():
confidence = 0
spoofable = 0
in_cti = True
if "labels" in scenario:
labels = scenario["labels"]
if "label" in labels:
scenario_label = scenario["labels"]["label"]
if "spoofable" in labels:
spoofable = labels["spoofable"]
else:
scenario_errors.append("`spoofable` key not found in labels")
if "confidence" in labels:
confidence = labels["confidence"]
else:
scenario_errors.append("`confidence` key not found in labels")

if "cti" in labels:
if labels["cti"] == False:
in_cti = False

if "label" in labels:
scenario_label = scenario["labels"]["label"]
if "spoofable" in labels:
spoofable = labels["spoofable"]
else:
scenario_errors.append("`spoofable` key not found in labels")
if "confidence" in labels:
confidence = labels["confidence"]
else:
scenario_errors.append("`confidence` key not found in labels")

if "cti" in labels:
if labels["cti"] == False:
in_cti = False

if scenario_label == "":
desc = scenario["description"].lower()
Expand Down

0 comments on commit b789b31

Please sign in to comment.