aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sec_certs/sample
diff options
context:
space:
mode:
authorAdam Janovsky2023-04-20 17:49:24 +0200
committerAdam Janovsky2023-04-20 17:49:24 +0200
commitce3857d1a031e90cea7cb884e9cd61c417669c03 (patch)
treeecab51d06ce970a42fab56d1626b340991dd20b2 /src/sec_certs/sample
parentfec63347e3d012a32038762917a78f565c9e5b1c (diff)
downloadsec-certs-ce3857d1a031e90cea7cb884e9cd61c417669c03.tar.gz
sec-certs-ce3857d1a031e90cea7cb884e9cd61c417669c03.tar.zst
sec-certs-ce3857d1a031e90cea7cb884e9cd61c417669c03.zip
some more cve/cpe tests
Diffstat (limited to 'src/sec_certs/sample')
-rw-r--r--src/sec_certs/sample/cpe.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sec_certs/sample/cpe.py b/src/sec_certs/sample/cpe.py
index 2cc267c9..5e9e8b65 100644
--- a/src/sec_certs/sample/cpe.py
+++ b/src/sec_certs/sample/cpe.py
@@ -61,7 +61,7 @@ class CPEMatchCriteriaConfiguration(ComplexSerializableType):
components: list[list[CPEMatchCriteria]]
_expanded_components: list[list[str]] = field(default_factory=list)
- def matches(self, cpe_ids: set[str]) -> bool:
+ def matches(self, cpe_uris: set[str]) -> bool:
"""
Returns if given set of cpe_ids matches this configuration.
"""
@@ -69,7 +69,7 @@ class CPEMatchCriteriaConfiguration(ComplexSerializableType):
raise ValueError(
"Cannot match to CPEMatchConfiguration when attribute _expanded_components was not filled-in. That attribute is prepared by `CVEDataset.build_lookup_dict()`."
)
- return all(any(x in component for x in cpe_ids) for component in self._expanded_components)
+ return all(any(x in component for x in cpe_uris) for component in self._expanded_components)
@property
def serialized_attributes(self) -> list[str]: