diff options
| author | adamjanovsky | 2021-11-15 15:06:18 +0100 |
|---|---|---|
| committer | GitHub | 2021-11-15 15:06:18 +0100 |
| commit | b6f85bab7ba4e875dc6e36a797706f0ea986acd2 (patch) | |
| tree | 50086c984379b80fa64fbb9a408711afc4c08f89 | |
| parent | 8776d6f334b6b738c73145e12d1a469e900c628c (diff) | |
| parent | eaa20a10a1628dd2b28fedaad5a17655ff5b4132 (diff) | |
| download | sec-certs-b6f85bab7ba4e875dc6e36a797706f0ea986acd2.tar.gz sec-certs-b6f85bab7ba4e875dc6e36a797706f0ea986acd2.tar.zst sec-certs-b6f85bab7ba4e875dc6e36a797706f0ea986acd2.zip | |
Merge pull request #110 from crocs-muni/compute-dependencies
Compute dependencies
| -rw-r--r-- | sec_certs/certificate/cc_maintenance_update.py | 2 | ||||
| -rw-r--r-- | sec_certs/certificate/common_criteria.py | 29 | ||||
| -rw-r--r-- | sec_certs/certificate/fips.py | 11 | ||||
| -rw-r--r-- | sec_certs/dataset/common_criteria.py | 31 | ||||
| -rw-r--r-- | sec_certs/dataset/fips.py | 2 | ||||
| -rw-r--r-- | sec_certs/helpers.py | 2 | ||||
| -rw-r--r-- | sec_certs/model/__init__.py | 0 | ||||
| -rw-r--r-- | sec_certs/model/dependency_finder.py | 123 | ||||
| -rw-r--r-- | sec_certs/serialization.py | 5 | ||||
| -rw-r--r-- | tests/data/test_cc_oop/dependency_dataset.json | 1041 | ||||
| -rw-r--r-- | tests/data/test_cc_oop/fictional_cert.json | 8 | ||||
| -rw-r--r-- | tests/data/test_cc_oop/toy_dataset.json | 16 | ||||
| -rw-r--r-- | tests/data/test_cpe_cve/vulnerable_dataset.json | 2 | ||||
| -rw-r--r-- | tests/test_cc_heuristics.py | 24 | ||||
| -rw-r--r-- | tests/test_cc_oop.py | 3 |
15 files changed, 1267 insertions, 32 deletions
diff --git a/sec_certs/certificate/cc_maintenance_update.py b/sec_certs/certificate/cc_maintenance_update.py index 7e4db349..4f87e836 100644 --- a/sec_certs/certificate/cc_maintenance_update.py +++ b/sec_certs/certificate/cc_maintenance_update.py @@ -16,7 +16,7 @@ class CommonCriteriaMaintenanceUpdate(CommonCriteriaCert, ComplexSerializableTyp def __init__(self, name: str, report_link: str, st_link: str, state: Optional[CommonCriteriaCert.InternalState], pdf_data: Optional[CommonCriteriaCert.PdfData], - heuristics: Optional[CommonCriteriaCert.Heuristics], + heuristics: Optional[CommonCriteriaCert.CCHeuristics], related_cert_digest: str, maintenance_date: date): super().__init__('', '', name, '', '', '', None, None, diff --git a/sec_certs/certificate/common_criteria.py b/sec_certs/certificate/common_criteria.py index c88bbd7b..dd501ed5 100644 --- a/sec_certs/certificate/common_criteria.py +++ b/sec_certs/certificate/common_criteria.py @@ -129,11 +129,11 @@ class CommonCriteriaCert(Certificate, ComplexSerializableType): @property def bsi_data(self) -> Optional[Dict[str, Any]]: - return self.report_frontpage['bsi'] + return self.report_frontpage.get('bsi', None) if self.report_frontpage else None @property def anssi_data(self) -> Optional[Dict[str, Any]]: - return self.report_frontpage['anssi'] + return self.report_frontpage.get('anssi', None) if self.report_frontpage else None @property def cert_lab(self) -> Optional[List[str]]: @@ -147,11 +147,11 @@ class CommonCriteriaCert(Certificate, ComplexSerializableType): @property def bsi_cert_id(self) -> Optional[str]: - return self.bsi_data.get('cert_id', None) + return self.bsi_data.get('cert_id', None) if self.bsi_data else None @property def anssi_cert_id(self) -> Optional[str]: - return self.anssi_data.get('cert_id', None) + return self.anssi_data.get('cert_id', None) if self.anssi_data else None @property def processed_cert_id(self) -> Optional[str]: @@ -165,7 +165,7 @@ class CommonCriteriaCert(Certificate, ComplexSerializableType): @property def keywords_rules_cert_id(self) -> Optional[Dict[str, Optional[Dict[str, Dict[str, int]]]]]: - return self.report_keywords['rules_cert_id'] + return self.report_keywords.get('rules_cert_id', None) if self.report_keywords else None @property def keywords_cert_id(self) -> Optional[str]: @@ -184,7 +184,7 @@ class CommonCriteriaCert(Certificate, ComplexSerializableType): return processed if (processed := self.processed_cert_id) else self.keywords_cert_id @dataclass - class Heuristics(ComplexSerializableType): + class CCHeuristics(ComplexSerializableType): extracted_versions: List[str] = field(default=None) cpe_matches: Optional[List[Tuple[float, CPE]]] = field(default=None) labeled: bool = field(default=False) @@ -192,6 +192,10 @@ class CommonCriteriaCert(Certificate, ComplexSerializableType): related_cves: Optional[List[CVE]] = field(default=None) cert_lab: Optional[List[str]] = field(default=None) cert_id: Optional[str] = field(default=None) + directly_affected_by: Optional[List[str]] = field(default=None) + indirectly_affected_by: Optional[Set[str]] = field(default=None) + directly_affecting: Optional[Set[str]] = field(default=None) + indirectly_affecting: Optional[Set[str]] = field(default=None) # manufacturer_list: Optional[List[str]] @@ -209,7 +213,8 @@ class CommonCriteriaCert(Certificate, ComplexSerializableType): pandas_columns: ClassVar[List[str]] = ['dgst', 'name', 'status', 'category', 'manufacturer', 'scheme', 'security_level', 'not_valid_before', 'not_valid_after', 'report_link', 'st_link', 'manufacturer_web', 'extracted_versions', 'cpe_matches', - 'verified_cpe_matches', 'related_cves'] + 'verified_cpe_matches', 'related_cves', 'directly_affected_by', + 'indirectly_affected_by', 'directly_affecting', 'indirectly_affecting'] def __init__(self, status: str, category: str, name: str, manufacturer: str, scheme: str, security_level: Union[str, set], not_valid_before: date, @@ -219,7 +224,7 @@ class CommonCriteriaCert(Certificate, ComplexSerializableType): maintainance_updates: Set[MaintainanceReport], state: Optional[InternalState], pdf_data: Optional[PdfData], - heuristics: Optional[Heuristics]): + heuristics: Optional[CCHeuristics]): super().__init__() self.status = status @@ -246,7 +251,7 @@ class CommonCriteriaCert(Certificate, ComplexSerializableType): self.pdf_data = pdf_data if heuristics is None: - heuristics = self.Heuristics() + heuristics = self.CCHeuristics() self.heuristics = heuristics @property @@ -261,13 +266,15 @@ class CommonCriteriaCert(Certificate, ComplexSerializableType): return self.name def __str__(self): - return self.manufacturer + ' ' + self.name + ' dgst: ' + self.dgst + # TODO - if some of the values is None -> TypeError is raised + return str(self.manufacturer) + ' ' + str(self.name) + ' dgst: ' + self.dgst def to_pandas_tuple(self): return self.dgst, self.name, self.status, self.category, self.manufacturer, self.scheme, self.security_level, \ self.not_valid_before, self.not_valid_after, self.report_link, self.st_link, self.manufacturer_web, \ self.heuristics.extracted_versions, self.heuristics.cpe_matches, self.heuristics.verified_cpe_matches, \ - self.heuristics.related_cves + self.heuristics.related_cves, self.heuristics.affected_direct, self.heuristics.affected_indirect, \ + self.heuristics.affecting_direct, self.heuristics.affecting_indirect def merge(self, other: 'CommonCriteriaCert', other_source: Optional[str] = None): """ diff --git a/sec_certs/certificate/fips.py b/sec_certs/certificate/fips.py index 6d131ab5..5379d283 100644 --- a/sec_certs/certificate/fips.py +++ b/sec_certs/certificate/fips.py @@ -142,7 +142,7 @@ class FIPSCertificate(Certificate, ComplexSerializableType): return str(self.cert_id) @dataclass(eq=True) - class Heuristics(ComplexSerializableType): + class FIPSHeuristics(ComplexSerializableType): keywords: Optional[Dict[str, Dict]] algorithms: List[Dict[str, Dict]] connections: List[str] @@ -155,6 +155,11 @@ class FIPSCertificate(Certificate, ComplexSerializableType): related_cves: Optional[List[str]] = field(default=None) cpe_candidate_vendors: Optional[List[str]] = field(init=False) + directly_affected_by: Set = field(default=None) + indirectly_affected_by: Set = field(default=None) + directly_affecting: Set = field(default=None) + indirectly_affecting: Set = field(default=None) + @property def serialized_attributes(self) -> List[str]: all_vars = copy.deepcopy(super().serialized_attributes) @@ -195,7 +200,7 @@ class FIPSCertificate(Certificate, ComplexSerializableType): def __init__(self, cert_id: str, web_scan: 'FIPSCertificate.WebScan', pdf_scan: 'FIPSCertificate.PdfScan', - heuristics: 'FIPSCertificate.Heuristics', + heuristics: 'FIPSCertificate.FIPSHeuristics', state: State): super().__init__() self.cert_id = cert_id @@ -456,7 +461,7 @@ class FIPSCertificate(Certificate, ComplexSerializableType): [] if not initialized else initialized.pdf_scan.algorithms, [] # connections ), - FIPSCertificate.Heuristics(None, {}, [], 0), + FIPSCertificate.FIPSHeuristics(None, {}, [], 0), state ) diff --git a/sec_certs/dataset/common_criteria.py b/sec_certs/dataset/common_criteria.py index 8739747c..2a28eb91 100644 --- a/sec_certs/dataset/common_criteria.py +++ b/sec_certs/dataset/common_criteria.py @@ -24,6 +24,7 @@ from sec_certs.dataset.protection_profile import ProtectionProfileDataset from sec_certs.certificate.protection_profile import ProtectionProfile from sec_certs.config.configuration import config from sec_certs.certificate.cc_maintenance_update import CommonCriteriaMaintenanceUpdate +from sec_certs.model.dependency_finder import DependencyFinder class CCDataset(Dataset, ComplexSerializableType): @@ -621,11 +622,23 @@ class CCDataset(Dataset, ComplexSerializableType): self.compute_cpe_heuristics() self._compute_cert_labs() self._compute_cert_ids() + self._compute_dependencies() + + def _compute_dependencies(self): + finder = DependencyFinder() + finder.fit(self.certs) + + for dgst in self.certs: + self.certs[dgst].CCHeuristics.directly_affecting = finder.get_directly_affecting(dgst) + self.certs[dgst].CCHeuristics.indirectly_affecting = finder.get_indirectly_affecting(dgst) + self.certs[dgst].CCHeuristics.directly_affected_by = finder.get_directly_affected_by(dgst) + self.certs[dgst].CCHeuristics.indirectly_affected_by = finder.get_indirectly_affected_by(dgst) @serialize def analyze_certificates(self, fresh: bool = True): if self.state.pdfs_converted is False: - logger.info('Attempting run analysis of txt files while not having the pdf->txt conversion done. Returning.') + logger.info( + 'Attempting run analysis of txt files while not having the pdf->txt conversion done. Returning.') return self._extract_data(fresh) @@ -650,7 +663,8 @@ class CCDataset(Dataset, ComplexSerializableType): try: inpts = [int(x) for x in inpts] if min(inpts) < 0 or max(inpts) > len(x.heuristics.cpe_matches) - 1: - raise ValueError(f'Incorrect number chosen, choose in range 0-{len(x.heuristics.cpe_matches) - 1}') + raise ValueError( + f'Incorrect number chosen, choose in range 0-{len(x.heuristics.cpe_matches) - 1}') except ValueError as e: logger.error(f'Bad input from user, repeating instance: {e}') print(f'Bad input from user, repeating instance: {e}') @@ -665,7 +679,8 @@ class CCDataset(Dataset, ComplexSerializableType): self.to_json() self[x.dgst].heuristics.labeled = True - certs_to_verify: List[CommonCriteriaCert] = [x for x in self if (x.heuristics.cpe_matches and not x.heuristics.labeled)] + certs_to_verify: List[CommonCriteriaCert] = [x for x in self if + (x.heuristics.cpe_matches and not x.heuristics.labeled)] logger.info('Manually verifying CPE matches') time.sleep(0.05) # easier than flushing the logger verify_certs(certs_to_verify) @@ -680,10 +695,12 @@ class CCDataset(Dataset, ComplexSerializableType): verified_cpe_rich_certs = [x for x in self if x.heuristics.verified_cpe_matches] if not verified_cpe_rich_certs: - logger.error('No certificates with verified CPE match detected. You must run dset.manually_verify_cpe_matches() first. Returning.') + logger.error( + 'No certificates with verified CPE match detected. You must run dset.manually_verify_cpe_matches() first. Returning.') return - relevant_cpes = itertools.chain.from_iterable([x.heuristics.verified_cpe_matches for x in verified_cpe_rich_certs]) + relevant_cpes = itertools.chain.from_iterable( + [x.heuristics.verified_cpe_matches for x in verified_cpe_rich_certs]) relevant_cpes = set([x.uri for x in relevant_cpes]) cve_dset.filter_related_cpes(relevant_cpes) @@ -714,7 +731,8 @@ class CCDataset(Dataset, ComplexSerializableType): def process_maintenance_updates(self): maintained_certs: List[CommonCriteriaCert] = [x for x in self if x.maintainance_updates] - updates = list(itertools.chain.from_iterable([CommonCriteriaMaintenanceUpdate.get_updates_from_cc_cert(x) for x in maintained_certs])) + updates = list(itertools.chain.from_iterable( + [CommonCriteriaMaintenanceUpdate.get_updates_from_cc_cert(x) for x in maintained_certs])) update_dset: CCDatasetMaintenanceUpdates = CCDatasetMaintenanceUpdates({x.dgst: x for x in updates}, root_dir=self.certs_dir / 'maintenance', name='Maintainance updates') @@ -728,6 +746,7 @@ class CCDatasetMaintenanceUpdates(CCDataset, ComplexSerializableType): """ Should be used merely for actions related to Maintenance updates: download pdfs, convert pdfs, extract data from pdfs """ + def __init__(self, certs: Dict[str, 'CommonCriteriaMaintenanceUpdate'], root_dir: Path, name: str = 'dataset name', description: str = 'dataset_description', state: Optional[CCDataset.DatasetInternalState] = None): super().__init__(certs, root_dir, name, description, state) diff --git a/sec_certs/dataset/fips.py b/sec_certs/dataset/fips.py index 35000f27..53bb0c76 100644 --- a/sec_certs/dataset/fips.py +++ b/sec_certs/dataset/fips.py @@ -279,7 +279,7 @@ class FIPSDataset(Dataset, ComplexSerializableType): logger.info("Removing 'processed' field. This dataset can be used to be uploaded and later downloaded using latest_snapshot() or something") cert: FIPSCertificate for cert in self.certs.values(): - cert.heuristics = FIPSCertificate.Heuristics(None, {}, [], 0) + cert.heuristics = FIPSCertificate.FIPSHeuristics(None, {}, [], 0) self.match_algs() diff --git a/sec_certs/helpers.py b/sec_certs/helpers.py index 8840002c..374bec1f 100644 --- a/sec_certs/helpers.py +++ b/sec_certs/helpers.py @@ -9,7 +9,7 @@ from pathlib import Path from tqdm import tqdm import hashlib import html -from typing import Union +from typing import Union, List from datetime import date import numpy as np import pandas as pd diff --git a/sec_certs/model/__init__.py b/sec_certs/model/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/sec_certs/model/__init__.py diff --git a/sec_certs/model/dependency_finder.py b/sec_certs/model/dependency_finder.py new file mode 100644 index 00000000..19a2fc31 --- /dev/null +++ b/sec_certs/model/dependency_finder.py @@ -0,0 +1,123 @@ +from typing import List, Set, Dict, Tuple, Union, Optional +from sec_certs.certificate.common_criteria import CommonCriteriaCert + +Certificates = Dict[str, CommonCriteriaCert] +ReferencedByDirect = Dict[str, List[str]] +ReferencedByIndirect = Dict[str, Set[str]] +Dependencies = Dict[str, Dict[str, Union[Optional[List[str]], Optional[Set[str]]]]] + + +class DependencyFinder: + + def __init__(self): + self.dependencies: Dependencies = {} + + @staticmethod + def _update_direct_references(referenced_by: ReferencedByDirect, cert_id: str, this_cert_id: str) -> None: + if cert_id not in referenced_by: + referenced_by[cert_id] = [] + if this_cert_id not in referenced_by[cert_id]: + referenced_by[cert_id].append(this_cert_id) + + @staticmethod + def _build_cert_references(certificates: Certificates) -> Tuple[ReferencedByDirect, ReferencedByIndirect]: + referenced_by: ReferencedByDirect = {} + + for cert_obj in certificates.values(): + if cert_obj.pdf_data.report_keywords is None: + continue + + this_cert_id = None + if cert_obj.pdf_data.processed_cert_id is not None: + this_cert_id = cert_obj.pdf_data.processed_cert_id + + # Direct reference + for cert_id in cert_obj.pdf_data.report_keywords["rules_cert_id"]: + if cert_id != this_cert_id and this_cert_id is not None: + DependencyFinder._update_direct_references(referenced_by, cert_id, this_cert_id) + + referenced_by_indirect: ReferencedByIndirect = {} + + for cert_id in referenced_by.keys(): + referenced_by_indirect[cert_id] = set() + for item in referenced_by[cert_id]: + referenced_by_indirect[cert_id].add(item) + + new_change_detected = True + while new_change_detected: + new_change_detected = False + certs_id_list = referenced_by.keys() + + for cert_id in certs_id_list: + tmp_referenced_by_indirect_nums = referenced_by_indirect[cert_id].copy() + for referencing in tmp_referenced_by_indirect_nums: + if referencing in referenced_by.keys(): + tmp_referencing = referenced_by_indirect[referencing].copy() + newly_discovered_references = [x for x in tmp_referencing if + x not in referenced_by_indirect[cert_id]] + referenced_by_indirect[cert_id].update(newly_discovered_references) + new_change_detected = True if newly_discovered_references else False + + return referenced_by, referenced_by_indirect + + @staticmethod + def _get_affecting_directly(cert: str, referenced_by_direct: ReferencedByDirect) -> Set[str]: + filter_direct = set() + + for cert_id in referenced_by_direct: + if cert in referenced_by_direct[cert_id]: + filter_direct.add(cert_id) + + return filter_direct + + @staticmethod + def _get_affecting_indirectly(cert: str, referenced_by_indirect: ReferencedByIndirect) -> Set[str]: + filter_indirect = set() + + for cert_id in referenced_by_indirect: + if cert in referenced_by_indirect[cert_id]: + filter_indirect.add(cert_id) + + return filter_indirect + + @staticmethod + def _get_affected_directly(cert: str, referenced_by_direct: ReferencedByDirect) -> Optional[List[str]]: + return referenced_by_direct.get(cert, None) + + @staticmethod + def _get_affected_indirectly(cert: str, referenced_by_indirect: ReferencedByIndirect) -> Optional[Set[str]]: + return referenced_by_indirect.get(cert, None) + + def fit(self, certificates: Certificates) -> None: + referenced_by_direct, referenced_by_indirect = DependencyFinder._build_cert_references(certificates) + + for dgst in certificates: + cert_id = certificates[dgst].pdf_data.cert_id + self.dependencies[dgst] = {} + + if not cert_id: + continue + + self.dependencies[dgst]["directly_affected_by"] = \ + DependencyFinder._get_affected_directly(cert_id, referenced_by_direct) + + self.dependencies[dgst]["indirectly_affected_by"] = \ + DependencyFinder._get_affected_indirectly(cert_id, referenced_by_indirect) + + self.dependencies[dgst]["directly_affecting"] = \ + DependencyFinder._get_affecting_directly(cert_id, referenced_by_direct) + + self.dependencies[dgst]["indirectly_affecting"] = \ + DependencyFinder._get_affecting_indirectly(cert_id, referenced_by_indirect) + + def get_directly_affected_by(self, dgst: str) -> Optional[List[str]]: + return self.dependencies[dgst].get("directly_affected_by", None) + + def get_indirectly_affected_by(self, dgst: str) -> Optional[Set[str]]: + return self.dependencies[dgst].get("indirectly_affected_by", None) + + def get_directly_affecting(self, dgst: str) -> Optional[Set[str]]: + return self.dependencies[dgst].get("directly_affecting", None) + + def get_indirectly_affecting(self, dgst: str) -> Optional[Set[str]]: + return self.dependencies[dgst].get("indirectly_affecting", None) diff --git a/sec_certs/serialization.py b/sec_certs/serialization.py index e24138a8..f63b6cba 100644 --- a/sec_certs/serialization.py +++ b/sec_certs/serialization.py @@ -20,7 +20,10 @@ class ComplexSerializableType: @classmethod def from_dict(cls, dct: Dict): - return cls(*(tuple(dct.values()))) + try: + return cls(*(tuple(dct.values()))) + except TypeError as e: + raise TypeError(f'Dict: {dct} with mro: {cls.__mro__}') from e # Decorator for serialization diff --git a/tests/data/test_cc_oop/dependency_dataset.json b/tests/data/test_cc_oop/dependency_dataset.json new file mode 100644 index 00000000..666f2341 --- /dev/null +++ b/tests/data/test_cc_oop/dependency_dataset.json @@ -0,0 +1,1041 @@ +{ + "_type": "CCDataset", + "state": { + "_type": "DatasetInternalState", + "meta_sources_parsed": false, + "pdfs_downloaded": false, + "pdfs_converted": false, + "certs_analyzed": false + }, + "timestamp": "2021-11-14 13:18:53.333058", + "sha256_digest": "not implemented", + "name": "test dataset", + "description": "test dataset for testing dependencies", + "n_certs": 3, + "certs": [ + { + "_type": "CommonCriteriaCert", + "dgst": "c30de3192d2e8ec2", + "status": "archived", + "category": "Other Devices and Systems", + "name": "Océ Digital Access Controller (DAC) R10.1.5 for use in the Océ VarioPrint 1055, 1055 BC, 1055 DP, 1065, 1075, 2062, 2075, 2075 DP printer/copier/scanner products", + "manufacturer": "Océ N.V.", + "scheme": "DE", + "security_level": [ + "ALC_FLR.1", + "EAL2+" + ], + "not_valid_before": "2009-02-20", + "not_valid_after": "2019-09-01", + "report_link": "https://www.commoncriteriaportal.org/files/epfiles/0517a.pdf", + "st_link": "https://www.commoncriteriaportal.org/files/epfiles/0517b.pdf", + "cert_link": null, + "manufacturer_web": "https://global.oce.com/", + "protection_profiles": [], + "maintainance_updates": [], + "state": { + "_type": "InternalState", + "st_download_ok": true, + "report_download_ok": true, + "st_convert_ok": true, + "report_convert_ok": true, + "st_extract_ok": true, + "report_extract_ok": true, + "errors": [] + }, + "pdf_data": { + "_type": "PdfData", + "report_metadata": { + "pdf_file_size_bytes": 393439, + "pdf_is_encrypted": false, + "pdf_number_of_pages": 32, + "/CreationDate": "D:20090319113422+01'00'", + "/Subject": "Common Criteria, Certification", + "/Author": "Bundesamt für Sicherheit in der Informationstechnik", + "/Creator": "Writer", + "/Keywords": "\"Océ Digital Access Controller (DAC) R10.1.5for use in the Océ VarioPrint 1055, 1055 BC, 1055 DP, 1065, 1075, 2062, 2075, 2075 DP printer/copier/scanner products, Océ Technologies B.V., BSI-DSZ-CC-0517-2009, Common Criteria, Certification\"", + "/Producer": "StarOffice 9", + "/ModDate": "D:20090319183830+01'00'", + "/Title": "Certification Report BSI-DSZ-CC-0517-2009" + }, + "st_metadata": { + "pdf_file_size_bytes": 1483390, + "pdf_is_encrypted": false, + "pdf_number_of_pages": 95, + "/CreationDate": "D:20090119132159+01'00'", + "/Subject": "Security Target", + "/Author": "Océ Technologies B.V.", + "/Creator": "Acrobat PDFMaker 5.0 for Word", + "/Keywords": "Common Criteria, Certification, Océ, Digital Access Controller, DAC, MFD", + "/Producer": "Acrobat Distiller 5.0.5 (Windows)", + "/ModDate": "D:20090319184150+01'00'", + "/Title": "Security Target The Océ Digital Access Controller (DAC) R10.1.5, as used in the Océ VarioPrint 1055, 1055 BC, 1055 DP, 1065, 1075, 2062, 2075, 2075 DP printer/copier/scanner products" + }, + "report_frontpage": { + "bsi": { + "match_rules": [ + "(BSI-DSZ-CC-.+?) (?:for|For) (.+?) from (.*)" + ], + "cert_id": "BSI-DSZ-CC-0517-2009", + "cert_item": "Oc Digital Access Controller (DAC) R10.1.5 for use in the Oc VarioPrint 1055, 1055 BC, 1055 DP, 1065, 1075, 2062, 2075, 2075 DP printer/copier/scanner products", + "developer": "Oc Technologies B.V", + "cert_lab": "BSI" + }, + "anssi": {} + }, + "st_frontpage": { + "anssi": {}, + "bsi": {} + }, + "report_keywords": { + "rules_vendor": {}, + "rules_cert_id": { + "BSI-DSZ-CC-0517-2009": 31, + "BSI-DSZ-CC-0370-2006": 1 + }, + "rules_protection_profiles": {}, + "rules_technical_reports": { + "BSI 7125": 2, + "BSI 7148": 1, + "BSI 7149": 1 + }, + "rules_device_id": {}, + "rules_os": {}, + "rules_standard_id": { + "AIS 32": 1, + "AIS 38": 1, + "ISO/IEC 15408:2005": 2 + }, + "rules_security_level": { + "EAL 2": 4, + "EAL 1": 1, + "EAL 7": 1, + "EAL 4": 1, + "EAL1": 5, + "EAL2": 4, + "EAL3": 4, + "EAL4": 5, + "EAL5": 6, + "EAL6": 4, + "EAL7": 4, + "EAL 2 augmented": 3 + }, + "rules_security_assurance_components": { + "ACM_AUT": 2, + "ACM_CAP": 2, + "ACM_SCP": 2, + "ADO_DEL": 2, + "ADO_IGS": 2, + "ADV_FSP": 2, + "ADV_HLD": 2, + "ADV_IMP": 2, + "ADV_INT": 2, + "ADV_LLD": 2, + "ADV_RCR": 2, + "ADV_SPM": 2, + "AGD_ADM": 2, + "AGD_USR": 2, + "ALC_FLR.1": 3, + "ALC_DVS": 2, + "ALC_FLR": 2, + "ALC_LCD": 2, + "ALC_TAT": 2, + "ATE_COV": 2, + "ATE_DPT": 2, + "ATE_FUN": 2, + "ATE_IND": 2, + "AVA_CCA": 2, + "AVA_MSU": 2, + "AVA_SOF": 3, + "AVA_VLA": 3, + "AVA_VLA.2": 1, + "AVA_VLA.3": 1, + "AVA_VLA.4": 1, + "APE_DES": 1, + "APE_ENV": 1, + "APE_INT": 1, + "APE_OBJ": 1, + "APE_REQ": 1, + "APE_SRE": 1, + "ASE_DES": 1, + "ASE_ENV": 1, + "ASE_INT": 1, + "ASE_OBJ": 1, + "ASE_PPC": 1, + "ASE_REQ": 1, + "ASE_SRE": 1, + "ASE_TSS": 1 + }, + "rules_security_functional_components": {}, + "rules_cc_claims": { + "D.PRINT_JOB": 2, + "D.SECURE_PRINT_JOB": 1, + "D.SCAN_JOB": 1 + }, + "rules_javacard": {}, + "rules_javacard_api_consts": {}, + "rules_javacard_packages": {}, + "rules_crypto_algs": { + "DES": 2 + }, + "rules_block_cipher_modes": {}, + "rules_ecc_curves": {}, + "rules_cplc": {}, + "rules_crypto_engines": {}, + "rules_crypto_libs": {}, + "rules_IC_data_groups": {}, + "rules_defenses": {}, + "rules_certification_process": { + "h January 2009, \"Evaluation Technical Report Digital Access Controller (DAC) R10.1.5\", Brightsight (confidential document) [8] Configuration list for the TOE, Version 3.3, 19th January 2009, \"Configuration Management List": 1, + ", 1055 DP, 1065, 1075, 2062, 2075, 2075 DP printer/copier/scanner products\", Oc Technologies B.V. (confidential document) [9] Oc VarioPrint 1055-75 Job manual, Code Number 1060061982, Edition 2007, 2.1, Oc Technologies": 1 + }, + "rules_vulnerabilities": {}, + "rules_other": {} + }, + "st_keywords": { + "rules_vendor": {}, + "rules_cert_id": {}, + "rules_protection_profiles": {}, + "rules_technical_reports": {}, + "rules_device_id": {}, + "rules_os": {}, + "rules_standard_id": {}, + "rules_security_level": { + "EAL2": 7, + "EAL2+": 1, + "EAL 2": 3 + }, + "rules_security_assurance_components": { + "ACM_CAP.2": 2, + "ADO_DEL.1": 2, + "ADO_IGS.1": 2, + "ADV_FSP.1": 2, + "ADV_HLD.1": 2, + "ADV_RCR.1": 2, + "AGD_ADM.1": 2, + "AGD_USR.1": 2, + "ALC_FLR.1": 6, + "ALC_FLR": 1, + "ATE_COV.1": 2, + "ATE_FUN.1": 2, + "ATE_IND.2": 2, + "AVA_SOF.1": 2, + "AVA_VLA.1": 3, + "ASE_JOB": 6 + }, + "rules_security_functional_components": { + "FDP_ACC.1": 7, + "FDP_ACF.1": 6, + "FDP_ACF.1.2": 1, + "FDP_ACF.1.3": 1, + "FDP_ACF.1.4": 1, + "FDP_RIP.1": 3, + "FIA_UID.1": 10, + "FIA_UID.1.1": 1, + "FIA_UID.1.2": 1, + "FIA_UAU.1": 5, + "FIA_UAU.1.1": 1, + "FIA_UAU.1.2": 1, + "FIA_UID.2": 6, + "FIA_UID.2.1": 1, + "FIA_UAU.2": 5, + "FIA_UAU.2.1": 1, + "FMT_MSA.3": 6, + "FMT_MOF.1": 4, + "FMT_MOF.1.1": 2, + "FMT_SMF.1": 7, + "FMT_SMR.1": 8, + "FMT_MSA.1": 6, + "FMT_MSA.1.1": 1, + "FMT_MSA.3.1": 1, + "FMT_MSA.3.2": 1, + "FMT_SMF.1.1": 1, + "FMT_SMR.1.1": 1, + "FPT_SEP.1": 8, + "FPT_SEP.1.2": 1, + "FPT_RVM.1": 8, + "FPT_RVM.1.1": 1, + "FPT_TST.1": 3, + "FPT_TST.1.1": 1, + "FPT_TST.1.2": 1, + "FPT_TST.1.3": 1, + "FPT_AMT.1": 3 + }, + "rules_cc_claims": { + "D.SECURE_PRINT_JOB": 30, + "D.PRINT_JOB": 24, + "D.SCAN_JOB": 23, + "D.INBOUND_TRAFFIC": 9, + "D.OUTBOUND_TRAFFIC": 7, + "D.PRINTJOB": 2, + "D.SCANJOB": 2, + "D.SECURE_PRINTJOB": 1, + "O.F.INBOUND_FILTER": 5, + "O.F.OUTBOUND_FILTER": 4, + "O.F.JOB_RELEASE": 5, + "O.F.JOB_SHRED": 4, + "O.F.AUTHENTICATE": 5, + "O.F.SELFTEST": 4, + "O.A.SLA": 4, + "O.E.ENVIRONMENT": 3, + "O.E.DEPLOYMENT": 3, + "O.E.DIGITAL_COPIER": 4, + "O.E.SHREDDING": 4, + "O.F.OUTBOUND_FLITER": 1, + "O.F.JOB_SHREAD": 2, + "O.E.NETWORK_POLICY": 2, + "O.F.SELFTTEST": 1, + "T.RESIDUAL_DATA": 3, + "T.NOSY_USER": 3, + "T.MALWARE": 4, + "A.DIGITAL_COPIER": 3, + "A.ENVIRONMENT": 3, + "A.SECURITY_POLICY": 3, + "A.SHREDDING": 3, + "A.SLA": 7, + "R.RELEASE_JOB": 6, + "R.PRINT_JOB": 4, + "R.FORWARD_JOB": 4, + "R.SCAN_JOB": 4, + "R.SHRED_JOB": 2, + "R.ENTER_TOE": 4, + "R.EXIT_TOE": 4, + "R.REMOTE_USER": 1, + "R": 1 + }, + "rules_javacard": {}, + "rules_javacard_api_consts": {}, + "rules_javacard_packages": {}, + "rules_crypto_algs": {}, + "rules_block_cipher_modes": {}, + "rules_ecc_curves": {}, + "rules_cplc": {}, + "rules_crypto_engines": {}, + "rules_crypto_libs": {}, + "rules_IC_data_groups": {}, + "rules_defenses": {}, + "rules_certification_process": {}, + "rules_vulnerabilities": {}, + "rules_other": {} + } + }, + "heuristics": { + "_type": "Heuristics", + "extracted_versions": [ + "10.1.5" + ], + "cpe_matches": null, + "labeled": false, + "verified_cpe_matches": null, + "related_cves": null, + "cert_lab": [ + "BSI" + ], + "cert_id": "BSI-DSZ-CC-0517-2009" + } + }, + { + "_type": "CommonCriteriaCert", + "dgst": "53fe111411edfa45", + "status": "archived", + "category": "Other Devices and Systems", + "name": "Océ Digital Access Controller (DAC) R9.1.6", + "manufacturer": "Océ N.V.", + "scheme": "DE", + "security_level": [ + "ALC_FLR.1", + "EAL2+" + ], + "not_valid_before": "2006-10-26", + "not_valid_after": "2019-09-01", + "report_link": "https://www.commoncriteriaportal.org/files/epfiles/0370a.pdf", + "st_link": "https://www.commoncriteriaportal.org/files/epfiles/0370b.pdf", + "cert_link": null, + "manufacturer_web": "https://global.oce.com/", + "protection_profiles": [], + "maintainance_updates": [], + "state": { + "_type": "InternalState", + "st_download_ok": true, + "report_download_ok": true, + "st_convert_ok": true, + "report_convert_ok": true, + "st_extract_ok": true, + "report_extract_ok": true, + "errors": [] + }, + "pdf_data": { + "_type": "PdfData", + "report_metadata": { + "pdf_file_size_bytes": 296713, + "pdf_is_encrypted": false, + "pdf_number_of_pages": 42, + "/CreationDate": "D:20061120121645+01'00'", + "/Subject": "Certification Report BSI-DSZ-CC-0370-2006", + "/Author": "Bundesamt für Sicherheit in der Informationstechnik", + "/Creator": "Acrobat PDFMaker 7.0.7 für Word", + "/Keywords": "Common Criteria, Certification, Zertifizierung", + "/Producer": "Acrobat Distiller 7.0.5 (Windows)", + "/ModDate": "D:20061123132355+01'00'", + "/Company": "BSI, Postfach 200363, 53133 Bonn", + "/SourceModified": "D:20061120111624", + "/Title": "Certification Report BSI-DSZ-CC-0370-2006" + }, + "st_metadata": { + "pdf_file_size_bytes": 565604, + "pdf_is_encrypted": false, + "pdf_number_of_pages": 63, + "/CreationDate": "D:20060829071953Z", + "/Author": "hunter", + "/Creator": "PScript5.dll Version 5.2.2", + "/Producer": "Acrobat Distiller 5.0.5 (Windows)", + "/ModDate": "D:20061123132807+01'00'", + "/Title": "Microsoft Word - Oce Venlo DAC Security Target 2.4.doc" + }, + "report_frontpage": { + "bsi": { + "match_rules": [ + "(BSI-DSZ-CC-.+?) (?:for|For) (.+?) from (.*)" + ], + "cert_id": "BSI-DSZ-CC-0370-2006", + "cert_item": "Oc Digital Access Controller (DAC) R9.1.6", + "developer": "Oc Technologies B.V", + "cert_lab": "BSI" + }, + "anssi": {} + }, + "st_frontpage": { + "anssi": {}, + "bsi": {} + }, + "report_keywords": { + "rules_vendor": {}, + "rules_cert_id": { + "BSI-DSZ-CC-0370-2006": 40, + "BSI-DSZ-CC-0325-2006": 1 + }, + "rules_protection_profiles": {}, + "rules_technical_reports": { + "BSI 7125": 2, + "BSI 7148": 1, + "BSI 7149": 1 + }, + "rules_device_id": {}, + "rules_os": {}, + "rules_standard_id": { + "AIS 34": 1, + "AIS33": 1, + "ISO/IEC 15408:2005": 2 + }, + "rules_security_level": { + "EAL2": 7, + "EAL4": 6, + "EAL 1": 1, + "EAL 7": 1, + "EAL 4": 1, + "EAL2+": 2, + "EAL1": 5, + "EAL3": 4, + "EAL5": 6, + "EAL6": 4, + "EAL7": 4, + "EAL2 augmented": 3 + }, + "rules_security_assurance_components": { + "ACM_CAP.2": 1, + "ACM_AUT": 2, + "ACM_CAP": 2, + "ACM_SCP": 2, + "ADO_DEL.1": 1, + "ADO_IGS.1": 1, + "ADO_DEL": 2, + "ADO_IGS": 2, + "ADV_FSP.1": 1, + "ADV_HLD.1": 1, + "ADV_RCR.1": 1, + "ADV_FSP": 2, + "ADV_HLD": 2, + "ADV_IMP": 2, + "ADV_INT": 2, + "ADV_LLD": 2, + "ADV_RCR": 2, + "ADV_SPM": 2, + "AGD_ADM.1": 1, + "AGD_USR.1": 1, + "AGD_ADM": 2, + "AGD_USR": 2, + "ALC_FLR.1": 4, + "ALC_DVS": 2, + "ALC_FLR": 2, + "ALC_LCD": 2, + "ALC_TAT": 2, + "ATE_COV.1": 1, + "ATE_FUN.1": 1, + "ATE_IND.2": 1, + "ATE_COV": 2, + "ATE_DPT": 2, + "ATE_FUN": 2, + "ATE_IND": 2, + "AVA_SOF.1": 1, + "AVA_VLA.1": 1, + "AVA_CCA": 2, + "AVA_MSU": 2, + "AVA_SOF": 3, + "AVA_VLA": 3, + "AVA_VLA.2": 1, + "AVA_VLA.3": 1, + "AVA_VLA.4": 1, + "ASE_DES.1": 1, + "ASE_ENV.1": 1, + "ASE_INT.1": 1, + "ASE_OBJ.1": 1, + "ASE_PPC.1": 1, + "ASE_REQ.1": 1, + "ASE_SRE.1": 1, + "ASE_TSS.1": 1 + }, + "rules_security_functional_components": { + "FDP_ACC.1": 1, + "FDP_ACF.1": 1, + "FDP_RIP.1": 1, + "FIA_UAU.1": 3, + "FIA_UAU.2": 2, + "FIA_UID.1": 3, + "FIA_UID.2": 3, + "FMT_MOF.1": 1, + "FMT_MSA.1": 1, + "FMT_MSA.3": 1, + "FMT_SMF.1": 1, + "FMT_SMR.1": 1, + "FPT_RVM.1": 1, + "FPT_SEP.1": 1, + "FPT_TST.1": 1 + }, + "rules_cc_claims": { + "D.SECURE_PRINT_JOB": 4, + "D.PRINTJOB": 1, + "D.SCANJOB": 1, + "D.PRINT_JOB": 2, + "D.SCAN_JOB": 1, + "T.RESIDUAL_DATA": 1, + "T.NOSY_USER": 1, + "T.MALWARE": 1, + "A.DIGITAL_COPIER": 1, + "A.ENVIRONMENT": 1, + "A.SECURITY_POLICY": 1, + "A.SHREDDING": 1, + "A.SLA": 1 + }, + "rules_javacard": {}, + "rules_javacard_api_consts": {}, + "rules_javacard_packages": {}, + "rules_crypto_algs": {}, + "rules_block_cipher_modes": {}, + "rules_ecc_curves": {}, + "rules_cplc": {}, + "rules_crypto_engines": {}, + "rules_crypto_libs": {}, + "rules_IC_data_groups": {}, + "rules_defenses": {}, + "rules_certification_process": { + "as used in the Oc VarioPrint 1055, 1065, 1075, 2062,2075 printer/copier/scanner products EAL2+ (confidential document) Guidance Documentation [9] Oc VarioPrint 1055, 1065,1075, 2062, 2075, Common Criteria Certified": 1 + }, + "rules_vulnerabilities": {}, + "rules_other": {} + }, + "st_keywords": { + "rules_vendor": {}, + "rules_cert_id": {}, + "rules_protection_profiles": {}, + "rules_technical_reports": {}, + "rules_device_id": {}, + "rules_os": {}, + "rules_standard_id": {}, + "rules_security_level": { + "EAL2": 7, + "EAL 2": 3, + "EAL2+": 1 + }, + "rules_security_assurance_components": { + "ACM_CAP.2": 2, + "ADO_DEL.1": 2, + "ADO_IGS.1": 2, + "ADV_FSP.1": 2, + "ADV_HLD.1": 2, + "ADV_RCR.1": 2, + "AGD_ADM.1": 2, + "AGD_USR.1": 2, + "ALC_FLR.1": 7, + "ALC_FLR": 1, + "ATE_COV.1": 2, + "ATE_FUN.1": 2, + "ATE_IND.2": 2, + "AVA_SOF.1": 2, + "AVA_VLA.1": 3, + "ASE_JOB": 6 + }, + "rules_security_functional_components": { + "FDP_ACC.1": 7, + "FDP_ACF.1": 6, + "FDP_ACF.1.2": 1, + "FDP_ACF.1.3": 1, + "FDP_ACF.1.4": 1, + "FDP_RIP.1": 3, + "FIA_UID.1": 10, + "FIA_UID.1.1": 1, + "FIA_UID.1.2": 1, + "FIA_UAU.1": 5, + "FIA_UAU.1.1": 1, + "FIA_UAU.1.2": 1, + "FIA_UID.2": 6, + "FIA_UID.2.1": 1, + "FIA_UAU.2": 5, + "FIA_UAU.2.1": 1, + "FMT_MSA.3": 6, + "FMT_MOF.1": 4, + "FMT_MOF.1.1": 2, + "FMT_SMF.1": 7, + "FMT_SMR.1": 8, + "FMT_MSA.1": 6, + "FMT_MSA.1.1": 1, + "FMT_MSA.3.1": 1, + "FMT_MSA.3.2": 1, + "FMT_SMF.1.1": 1, + "FMT_SMR.1.1": 1, + "FPT_SEP.1": 8, + "FPT_SEP.1.2": 1, + "FPT_RVM.1": 8, + "FPT_RVM.1.1": 1, + "FPT_TST.1": 3, + "FPT_TST.1.1": 1, + "FPT_TST.1.2": 1, + "FPT_TST.1.3": 1, + "FPT_AMT.1": 3 + }, + "rules_cc_claims": { + "D.SECURE_PRINT_JOB": 30, + "D.PRINT_JOB": 24, + "D.SCAN_JOB": 23, + "D.INBOUND_TRAFFIC": 8, + "D.OUTBOUND_TRAFFIC": 8, + "D.PRINTJOB": 2, + "D.SCANJOB": 2, + "D.SECURE_PRINTJOB": 1, + "O.F.INBOUND_FILTER": 5, + "O.F.OUTBOUND_FILTER": 4, + "O.F.JOB_RELEASE": 5, + "O.F.JOB_SHRED": 4, + "O.F.AUTHENTICATE": 5, + "O.F.SELFTEST": 4, + "O.A.SLA": 4, + "O.E.ENVIRONMENT": 3, + "O.E.DEPLOYMENT": 3, + "O.E.DIGITAL_COPIER": 4, + "O.E.SHREDDING": 4, + "O.F.OUTBOUND_FLITER": 1, + "O.F.JOB_SHREAD": 2, + "O.E.NETWORK_POLICY": 2, + "O.F.SELFTTEST": 1, + "T.RESIDUAL_DATA": 3, + "T.NOSY_USER": 3, + "T.MALWARE": 4, + "A.DIGITAL_COPIER": 3, + "A.ENVIRONMENT": 3, + "A.SECURITY_POLICY": 3, + "A.SHREDDING": 3, + "A.SLA": 7, + "R.RELEASE_JOB": 6, + "R.PRINT_JOB": 4, + "R.FORWARD_JOB": 4, + "R.SCAN_JOB": 4, + "R.SHRED_JOB": 2, + "R.ENTER_TOE": 4, + "R.EXIT_TOE": 4, + "R.REMOTE_USER": 1, + "R": 1 + }, + "rules_javacard": {}, + "rules_javacard_api_consts": {}, + "rules_javacard_packages": {}, + "rules_crypto_algs": {}, + "rules_block_cipher_modes": {}, + "rules_ecc_curves": {}, + "rules_cplc": {}, + "rules_crypto_engines": {}, + "rules_crypto_libs": {}, + "rules_IC_data_groups": {}, + "rules_defenses": {}, + "rules_certification_process": {}, + "rules_vulnerabilities": {}, + "rules_other": {} + } + }, + "heuristics": { + "_type": "Heuristics", + "extracted_versions": [ + "9.1.6" + ], + "cpe_matches": null, + "labeled": false, + "verified_cpe_matches": null, + "related_cves": null, + "cert_lab": [ + "BSI" + ], + "cert_id": "BSI-DSZ-CC-0370-2006" + } + }, + { + "_type": "CommonCriteriaCert", + "dgst": "692e91451741ef49", + "status": "archived", + "category": "Other Devices and Systems", + "name": "Océ Digital Access Controller R8.1.10", + "manufacturer": "Océ N.V.", + "scheme": "DE", + "security_level": [ + "ALC_FLR.1", + "EAL2+" + ], + "not_valid_before": "2006-01-27", + "not_valid_after": "2019-09-01", + "report_link": "https://www.commoncriteriaportal.org/files/epfiles/0325a.pdf", + "st_link": "https://www.commoncriteriaportal.org/files/epfiles/0325b.pdf", + "cert_link": null, + "manufacturer_web": "https://global.oce.com/", + "protection_profiles": [], + "maintainance_updates": [], + "state": { + "_type": "InternalState", + "st_download_ok": true, + "report_download_ok": true, + "st_convert_ok": true, + "report_convert_ok": true, + "st_extract_ok": true, + "report_extract_ok": true, + "errors": [] + }, + "pdf_data": { + "_type": "PdfData", + "report_metadata": { + "pdf_file_size_bytes": 628533, + "pdf_is_encrypted": false, + "pdf_number_of_pages": 44, + "/CreationDate": "D:20060214093547+01'00'", + "/Subject": "Océ Digital Access Controller (DAC)", + "/Author": "Bundesamt für Sicherheit in der Informationstechnik", + "/Creator": "Acrobat PDFMaker 7.0.5 für Word", + "/Keywords": "b'Oc\\xe9 Digital Access Controller (DAC)R 8.1.10, Certification Report BSI-DSZ-CC-0325-2006\\r\\n'", + "/Producer": "Acrobat Distiller 7.0.5 (Windows)", + "/ModDate": "D:20060302140843+01'00'", + "/Company": "BSI, Postfach 200363, 53133 Bonn", + "/SourceModified": "D:20060214083526", + "/Title": "Certification Report BSI-DSZ-CC-0325-2006" + }, + "st_metadata": { + "pdf_file_size_bytes": 545641, + "pdf_is_encrypted": false, + "pdf_number_of_pages": 64, + "/CreationDate": "D:20050908171003+02'00'", + "/ModDate": "D:20050908171003+02'00'", + "/Producer": "Acrobat Distiller 5.0.5 (Windows)", + "/Author": "hunter", + "/Creator": "PScript5.dll Version 5.2.2", + "/Title": "Microsoft Word - Oce Venlo DAC Security Target 1.9.doc" + }, + "report_frontpage": { + "bsi": { + "match_rules": [ + "(BSI-DSZ-CC-.+?) (?:for|For) (.+?) from (.*)" + ], + "cert_id": "BSI-DSZ-CC-0325-2006", + "cert_item": "Oc Digital Access Controller (DAC) R 8.1.10", + "developer": "Oc Technologies B.V", + "cert_lab": "BSI" + }, + "anssi": {} + }, + "st_frontpage": { + "anssi": {}, + "bsi": {} + }, + "report_keywords": { + "rules_vendor": {}, + "rules_cert_id": { + "BSI-DSZ-CC-0325-2006": 42, + "BSI-DSZ-CC-0268-2005": 1 + }, + "rules_protection_profiles": {}, + "rules_technical_reports": { + "BSI 7125": 2, + "BSI 7148": 1, + "BSI 7149": 1 + }, + "rules_device_id": {}, + "rules_os": {}, + "rules_standard_id": { + "AIS 34": 1, + "AIS 32": 1, + "AIS33": 1, + "ISO/IEC 15408:1999": 1 + }, + "rules_security_level": { + "EAL2": 7, + "EAL4": 6, + "EAL 1": 1, + "EAL 7": 1, + "EAL 4": 1, + "EAL2+": 2, + "EAL1": 5, + "EAL3": 4, + "EAL5": 6, + "EAL6": 4, + "EAL7": 4, + "EAL2 augmented": 3 + }, + "rules_security_assurance_components": { + "ACM_CAP.2": 1, + "ACM_AUT": 2, + "ACM_CAP": 2, + "ACM_SCP": 2, + "ADO_DEL.1": 1, + "ADO_IGS.1": 1, + "ADO_DEL": 2, + "ADO_IGS": 2, + "ADV_FSP.1": 1, + "ADV_HLD.1": 1, + "ADV_RCR.1": 1, + "ADV_FSP": 2, + "ADV_HLD": 2, + "ADV_IMP": 2, + "ADV_INT": 2, + "ADV_LLD": 2, + "ADV_RCR": 2, + "ADV_SPM": 2, + "AGD_ADM.1": 1, + "AGD_USR.1": 1, + "AGD_ADM": 2, + "AGD_USR": 2, + "ALC_FLR.1": 4, + "ALC_DVS": 2, + "ALC_FLR": 2, + "ALC_LCD": 2, + "ALC_TAT": 2, + "ATE_COV.1": 1, + "ATE_FUN.1": 1, + "ATE_IND.2": 1, + "ATE_COV": 2, + "ATE_DPT": 2, + "ATE_FUN": 2, + "ATE_IND": 2, + "AVA_SOF.1": 1, + "AVA_VLA.1": 1, + "AVA_CCA": 2, + "AVA_MSU": 2, + "AVA_SOF": 4, + "AVA_VLA": 4, + "AVA_VLA.2": 1, + "AVA_VLA.3": 1, + "AVA_VLA.4": 1, + "ASE_DES.1": 1, + "ASE_ENV.1": 1, + "ASE_INT.1": 1, + "ASE_OBJ.1": 1, + "ASE_PPC.1": 1, + "ASE_REQ.1": 1, + "ASE_SRE.1": 1, + "ASE_TSS.1": 1 + }, + "rules_security_functional_components": { + "FDP_ACC.1": 1, + "FDP_ACF.1": 1, + "FDP_RIP.1": 1, + "FIA_UAU.1": 3, + "FIA_UAU.2": 2, + "FIA_UID.1": 3, + "FIA_UID.2": 3, + "FMT_MOF.1": 1, + "FMT_MSA.1": 1, + "FMT_MSA.3": 1, + "FMT_SMF.1": 1, + "FMT_SMR.1": 1, + "FPT_RVM.1": 1, + "FPT_SEP.1": 1, + "FPT_TST.1": 1 + }, + "rules_cc_claims": { + "D.SECURE_PRINT_JOB": 4, + "D.PRINTJOB": 1, + "D.SCANJOB": 1, + "D.PRINT_JOB": 2, + "D.SCAN_JOB": 1, + "T.RESIDUAL_DATA": 1, + "T.NOSY_USER": 1, + "T.MALWARE": 1, + "A.DIGITAL_COPIER": 1, + "A.ENVIRONMENT": 1, + "A.SECURITY_POLICY": 1, + "A.SHREDDING": 1, + "A.SLA": 1 + }, + "rules_javacard": {}, + "rules_javacard_api_consts": {}, + "rules_javacard_packages": {}, + "rules_crypto_algs": {}, + "rules_block_cipher_modes": {}, + "rules_ecc_curves": {}, + "rules_cplc": {}, + "rules_crypto_engines": {}, + "rules_crypto_libs": {}, + "rules_IC_data_groups": {}, + "rules_defenses": {}, + "rules_certification_process": { + "65, the Oc VarioPrint 2050-70, the Oc 31x5 ranges of Oc printer/copier/scanner products EAL2+ (confidential document) Guidance Documentation [9] Oc VarioPrint 2045-65, Oc VarioPrint 2050-70, Oc 31x5: Common": 1 + }, + "rules_vulnerabilities": {}, + "rules_other": {} + }, + "st_keywords": { + "rules_vendor": {}, + "rules_cert_id": {}, + "rules_protection_profiles": {}, + "rules_technical_reports": {}, + "rules_device_id": {}, + "rules_os": {}, + "rules_standard_id": {}, + "rules_security_level": { + "EAL2": 7, + "EAL 2": 3, + "EAL2+": 1 + }, + "rules_security_assurance_components": { + "ACM_CAP.2": 2, + "ADO_DEL.1": 2, + "ADO_IGS.1": 2, + "ADV_FSP.1": 2, + "ADV_HLD.1": 2, + "ADV_RCR.1": 2, + "AGD_ADM.1": 2, + "AGD_USR.1": 2, + "ALC_FLR.1": 7, + "ALC_FLR": 1, + "ATE_COV.1": 2, + "ATE_FUN.1": 2, + "ATE_IND.2": 2, + "AVA_SOF.1": 2, + "AVA_VLA.1": 3, + "ASE_JOB": 6 + }, + "rules_security_functional_components": { + "FDP_ACC.1": 7, + "FDP_ACF.1": 6, + "FDP_ACF.1.2": 1, + "FDP_ACF.1.3": 1, + "FDP_ACF.1.4": 1, + "FDP_RIP.1": 3, + "FIA_UID.1": 10, + "FIA_UID.1.1": 1, + "FIA_UID.1.2": 1, + "FIA_UAU.1": 5, + "FIA_UAU.1.1": 1, + "FIA_UAU.1.2": 1, + "FIA_UID.2": 6, + "FIA_UID.2.1": 1, + "FIA_UAU.2": 5, + "FIA_UAU.2.1": 1, + "FMT_MSA.3": 6, + "FMT_MOF.1": 4, + "FMT_MOF.1.1": 2, + "FMT_SMF.1": 7, + "FMT_SMR.1": 8, + "FMT_MSA.1": 6, + "FMT_MSA.1.1": 1, + "FMT_MSA.3.1": 1, + "FMT_MSA.3.2": 1, + "FMT_SMF.1.1": 1, + "FMT_SMR.1.1": 1, + "FPT_SEP.1": 8, + "FPT_SEP.1.2": 1, + "FPT_RVM.1": 8, + "FPT_RVM.1.1": 1, + "FPT_TST.1": 3, + "FPT_TST.1.1": 1, + "FPT_TST.1.2": 1, + "FPT_TST.1.3": 1, + "FPT_AMT.1": 3 + }, + "rules_cc_claims": { + "D.SECURE_PRINT_JOB": 30, + "D.PRINT_JOB": 24, + "D.SCAN_JOB": 23, + "D.INBOUND_TRAFFIC": 8, + "D.OUTBOUND_TRAFFIC": 8, + "D.PRINTJOB": 2, + "D.SCANJOB": 2, + "D.SECURE_PRINTJOB": 1, + "O.F.INBOUND_FILTER": 5, + "O.F.OUTBOUND_FILTER": 4, + "O.F.JOB_RELEASE": 5, + "O.F.JOB_SHRED": 4, + "O.F.AUTHENTICATE": 5, + "O.F.SELFTEST": 4, + "O.A.SLA": 4, + "O.E.ENVIRONMENT": 3, + "O.E.DEPLOYMENT": 3, + "O.E.DIGITAL_COPIER": 4, + "O.E.SHREDDING": 4, + "O.F.OUTBOUND_FLITER": 1, + "O.F.JOB_SHREAD": 2, + "O.E.NETWORK_POLICY": 2, + "O.F.SELFTTEST": 1, + "T.RESIDUAL_DATA": 3, + "T.NOSY_USER": 3, + "T.MALWARE": 4, + "A.DIGITAL_COPIER": 3, + "A.ENVIRONMENT": 3, + "A.SECURITY_POLICY": 3, + "A.SHREDDING": 3, + "A.SLA": 7, + "R.RELEASE_JOB": 6, + "R.PRINT_JOB": 4, + "R.FORWARD_JOB": 4, + "R.SCAN_JOB": 4, + "R.SHRED_JOB": 2, + "R.ENTER_TOE": 4, + "R.EXIT_TOE": 4, + "R.REMOTE_USER": 1, + "R": 1 + }, + "rules_javacard": {}, + "rules_javacard_api_consts": {}, + "rules_javacard_packages": {}, + "rules_crypto_algs": {}, + "rules_block_cipher_modes": {}, + "rules_ecc_curves": {}, + "rules_cplc": {}, + "rules_crypto_engines": {}, + "rules_crypto_libs": {}, + "rules_IC_data_groups": {}, + "rules_defenses": {}, + "rules_certification_process": {}, + "rules_vulnerabilities": {}, + "rules_other": {} + } + }, + "heuristics": { + "_type": "Heuristics", + "extracted_versions": [ + "8.1.10" + ], + "cpe_matches": null, + "labeled": false, + "verified_cpe_matches": null, + "related_cves": null, + "cert_lab": [ + "BSI" + ], + "cert_id": "BSI-DSZ-CC-0325-2006" + } + } + ] +} diff --git a/tests/data/test_cc_oop/fictional_cert.json b/tests/data/test_cc_oop/fictional_cert.json index 87871037..4cf5729e 100644 --- a/tests/data/test_cc_oop/fictional_cert.json +++ b/tests/data/test_cc_oop/fictional_cert.json @@ -52,13 +52,17 @@ "st_keywords": null }, "heuristics": { - "_type": "Heuristics", + "_type": "CCHeuristics", "extracted_versions": null, "cpe_matches": null, "labeled": false, "verified_cpe_matches": null, "related_cves": null, "cert_lab": null, - "cert_id": null + "cert_id": null, + "directly_affected_by": null, + "indirectly_affected_by": null, + "directly_affecting": null, + "indirectly_affecting": null } }
\ No newline at end of file diff --git a/tests/data/test_cc_oop/toy_dataset.json b/tests/data/test_cc_oop/toy_dataset.json index c682fc65..2872f5e9 100644 --- a/tests/data/test_cc_oop/toy_dataset.json +++ b/tests/data/test_cc_oop/toy_dataset.json @@ -53,14 +53,18 @@ "st_keywords": null }, "heuristics": { - "_type": "Heuristics", + "_type": "CCHeuristics", "extracted_versions": null, "cpe_matches": null, "labeled": false, "verified_cpe_matches": null, "related_cves": null, "cert_lab": null, - "cert_id": null + "cert_id": null, + "directly_affected_by": null, + "indirectly_affected_by": null, + "directly_affecting": null, + "indirectly_affecting": null } }, { @@ -107,14 +111,18 @@ "st_keywords": null }, "heuristics": { - "_type": "Heuristics", + "_type": "CCHeuristics", "extracted_versions": null, "cpe_matches": null, "labeled": false, "verified_cpe_matches": null, "related_cves": null, "cert_lab": null, - "cert_id": null + "cert_id": null, + "directly_affected_by": null, + "indirectly_affected_by": null, + "directly_affecting": null, + "indirectly_affecting": null } } ] diff --git a/tests/data/test_cpe_cve/vulnerable_dataset.json b/tests/data/test_cpe_cve/vulnerable_dataset.json index 0d01e60f..eb0625a3 100644 --- a/tests/data/test_cpe_cve/vulnerable_dataset.json +++ b/tests/data/test_cpe_cve/vulnerable_dataset.json @@ -53,7 +53,7 @@ "st_keywords": null }, "heuristics": { - "_type": "Heuristics", + "_type": "CCHeuristics", "extracted_versions": [ "8.2" ], diff --git a/tests/test_cc_heuristics.py b/tests/test_cc_heuristics.py index 31dcbc8f..291881ae 100644 --- a/tests/test_cc_heuristics.py +++ b/tests/test_cc_heuristics.py @@ -134,3 +134,27 @@ class TestCommonCriteriaHeuristics(TestCase): frozenset(['KECS-PP-0822-2017 SSO V1.0'])) self.cc_dset.process_protection_profiles(to_download=False) self.assertSetEqual(self.cc_dset['ebd276cca70fd723'].protection_profiles, {expected_pp}) + + def test_single_record_dependency_heuristics(self): + # Single record in daset is not affecting nor affected by other records + heuristics = self.cc_dset['ebd276cca70fd723'].heuristics + self.assertEqual(heuristics.directly_affected_by, None) + self.assertEqual(heuristics.indirectly_affected_by, None) + self.assertEqual(heuristics.directly_affecting, None) + self.assertEqual(heuristics.indirectly_affecting, None) + + def test_dependency_dataset(self): + parent_dir = Path(__file__).parent + dependency_dataset = CCDataset.from_json(Path(parent_dir, "data/test_cc_oop/dependency_dataset.json")) + dependency_dataset._compute_dependencies() + test_cert = None + + for cert in dependency_dataset: + if cert.pdf_data.cert_id == "BSI-DSZ-CC-0370-2006": + test_cert = cert + break + + self.assertEqual(test_cert.CCHeuristics.directly_affected_by, ["BSI-DSZ-CC-0370-2006"]) + self.assertEqual(test_cert.CCHeuristics.indirectly_affected_by, {"BSI-DSZ-CC-0370-2006", "BSI-DSZ-CC-0517-2009"}) + self.assertEqual(test_cert.CCHeuristics.directly_affecting, {"BSI-DSZ-CC-0268-2005"}) + self.assertEqual(test_cert.CCHeuristics.indirectly_affecting, {"BSI-DSZ-CC-0268-2005"}) diff --git a/tests/test_cc_oop.py b/tests/test_cc_oop.py index 54fcbd4b..8592aa65 100644 --- a/tests/test_cc_oop.py +++ b/tests/test_cc_oop.py @@ -132,8 +132,9 @@ class TestCommonCriteriaOOP(TestCase): 'The dataset serialized to json differs from a template.') def test_cert_from_json(self): + new_cert = CommonCriteriaCert.from_json(self.test_data_dir / 'fictional_cert.json') self.assertEqual(self.fictional_cert, - CommonCriteriaCert.from_json(self.test_data_dir / 'fictional_cert.json'), + new_cert, 'The certificate serialized from json differs from a template.') def test_dataset_from_json(self): |
