aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGeogeFI2021-11-14 13:59:04 +0100
committerGeogeFI2021-11-14 13:59:04 +0100
commiteaa20a10a1628dd2b28fedaad5a17655ff5b4132 (patch)
tree598ff86005cb1ba6f0f05a259b9611fae3e59986
parentbb8f85f631dd8bc6737ae7b50fb4f8ebf2fd7e09 (diff)
downloadsec-certs-eaa20a10a1628dd2b28fedaad5a17655ff5b4132.tar.gz
sec-certs-eaa20a10a1628dd2b28fedaad5a17655ff5b4132.tar.zst
sec-certs-eaa20a10a1628dd2b28fedaad5a17655ff5b4132.zip
test: Finished tests for computing dependencies
-rw-r--r--tests/data/test_cc_oop/dependency_dataset.json1041
-rw-r--r--tests/test_cc_heuristics.py15
2 files changed, 1055 insertions, 1 deletions
diff --git a/tests/data/test_cc_oop/dependency_dataset.json b/tests/data/test_cc_oop/dependency_dataset.json
index e69de29b..666f2341 100644
--- a/tests/data/test_cc_oop/dependency_dataset.json
+++ 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/test_cc_heuristics.py b/tests/test_cc_heuristics.py
index 6f324597..291881ae 100644
--- a/tests/test_cc_heuristics.py
+++ b/tests/test_cc_heuristics.py
@@ -144,4 +144,17 @@ class TestCommonCriteriaHeuristics(TestCase):
self.assertEqual(heuristics.indirectly_affecting, None)
def test_dependency_dataset(self):
- assert True
+ 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"})