aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorAdam Janovsky2022-02-16 13:01:11 +0100
committerAdam Janovsky2022-02-16 13:01:11 +0100
commitd4ecef794fd01c17fe47cf672d28bd2a0f007724 (patch)
treeb2a5ea6c2b8a44e114b91d48895160a4d62a7eee /examples
parentf00534726fc736fa61e8f9c3e5484e67ecd1b8ed (diff)
downloadsec-certs-d4ecef794fd01c17fe47cf672d28bd2a0f007724.tar.gz
sec-certs-d4ecef794fd01c17fe47cf672d28bd2a0f007724.tar.zst
sec-certs-d4ecef794fd01c17fe47cf672d28bd2a0f007724.zip
fix cpe matching example
Diffstat (limited to 'examples')
-rw-r--r--examples/cc_cpe_labeling.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/cc_cpe_labeling.py b/examples/cc_cpe_labeling.py
index 89527bbe..752b8052 100644
--- a/examples/cc_cpe_labeling.py
+++ b/examples/cc_cpe_labeling.py
@@ -23,7 +23,7 @@ def main():
dset.get_certs_from_web(to_download=True)
# Automatically match CPEs and CVEs
- dset.compute_cpe_heuristics()
+ _, cpe_dset, _ = dset.compute_cpe_heuristics()
dset.compute_related_cves()
# Load dataset of ground truth CPE labels
@@ -37,7 +37,7 @@ def main():
# Evaluate CPE matching performance metrics (on validation set) and dump classification report into json
y_valid = [(x.heuristics.verified_cpe_matches) for x in validation_certs]
- evaluate(validation_certs, y_valid, "./my_debug_dataset/classification_report.json")
+ evaluate(validation_certs, y_valid, "./my_debug_dataset/classification_report.json", cpe_dset)
logger.info(f"{dset.json_path} should now contain fully labeled dataset.")