diff options
| author | Adam Janovsky | 2021-04-20 10:59:47 +0200 |
|---|---|---|
| committer | Adam Janovsky | 2021-04-20 10:59:47 +0200 |
| commit | 34eca2f67c6d0ab34657de2c9426ef08d5e70ab4 (patch) | |
| tree | f01d01c72131e82ca73a791db79f9b94dd0baf5f | |
| parent | b6d4be201d0eafd16416a170e4192928095f8a80 (diff) | |
| download | sec-certs-34eca2f67c6d0ab34657de2c9426ef08d5e70ab4.tar.gz sec-certs-34eca2f67c6d0ab34657de2c9426ef08d5e70ab4.tar.zst sec-certs-34eca2f67c6d0ab34657de2c9426ef08d5e70ab4.zip | |
dont compute heuristics immediately
| -rw-r--r-- | sec_certs/dataset/common_criteria.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sec_certs/dataset/common_criteria.py b/sec_certs/dataset/common_criteria.py index ef641a26..289f5584 100644 --- a/sec_certs/dataset/common_criteria.py +++ b/sec_certs/dataset/common_criteria.py @@ -613,8 +613,8 @@ class CCDataset(Dataset, ComplexSerializableType): compute_candidate_versions() cpe_dset = self.prepare_cpe_dataset(download_fresh_cpes) compute_cpe_matches(cpe_dset) - compute_cert_labs() - compute_cert_ids() + # compute_cert_labs() + # compute_cert_ids() if update_json is True: self.to_json(self.json_path) @@ -625,7 +625,7 @@ class CCDataset(Dataset, ComplexSerializableType): for i, x in enumerate(certificates_to_verify): print(f'\n[{i}/{n_certs_to_verify}] Vendor: {x.manufacturer}, Name: {x.name}') for index, c in enumerate(x.heuristics.cpe_matches): - print(f'\t- {[index]}: {c[1]}') + print(f'\t- {[index]}: {c[1].vendor} {c[1].title} CPE-URI: {c[1].uri}') print(f'\t- [A]: All are fitting') print(f'\t- [X]: No fitting match') inpts = input('Select fitting CPE matches (split with comma if choosing more):').strip().split(',') @@ -646,9 +646,9 @@ class CCDataset(Dataset, ComplexSerializableType): matches = [x.heuristics.cpe_matches[y][1] for y in inpts] self[x.dgst].heuristics.verified_cpe_matches = matches - if i != 0 and not i % 10 and update_json: - print(f'Saving progress.') - self.to_json() + if i != 0 and not i % 10 and update_json: + print(f'Saving progress.') + self.to_json() certs_to_verify: List[CommonCriteriaCert] = [x for x in self if (x.heuristics.cpe_matches and not x.heuristics.verified_cpe_matches)] logger.info('Manually verifying CPE matches') |
