aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sec_certs/sample
diff options
context:
space:
mode:
authorAdam Janovsky2023-03-16 09:44:24 +0100
committerAdam Janovsky2023-03-16 09:44:24 +0100
commit74eb4a0d6580ba819b30e2b808aef4921738d227 (patch)
treee04c0befa36f09c40ba8aadd013c3b99d9fe5e86 /src/sec_certs/sample
parent983bc3ce1a50ec7c081d54f03febefc2bce971cc (diff)
downloadsec-certs-74eb4a0d6580ba819b30e2b808aef4921738d227.tar.gz
sec-certs-74eb4a0d6580ba819b30e2b808aef4921738d227.tar.zst
sec-certs-74eb4a0d6580ba819b30e2b808aef4921738d227.zip
delay and prune look-up dict build in CVEDataset
Diffstat (limited to 'src/sec_certs/sample')
-rw-r--r--src/sec_certs/sample/cpe.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sec_certs/sample/cpe.py b/src/sec_certs/sample/cpe.py
index 1e3cbf12..d56535c2 100644
--- a/src/sec_certs/sample/cpe.py
+++ b/src/sec_certs/sample/cpe.py
@@ -35,6 +35,9 @@ class CPEConfiguration(ComplexSerializableType):
"""
return self.platform.uri in other_cpe_uris and any(x.uri in other_cpe_uris for x in self.cpes)
+ def get_all_cpes(self) -> set[CPE]:
+ return {self.platform}.union(self.cpes)
+
@dataclass
class CPE(PandasSerializableType, ComplexSerializableType):