Skip to main content

A tool for data scraping and analysis of security certificates from Common Criteria and FIPS 140-2/3 frameworks.

Project description

Sec-certs

A tool for data scraping and analysis of security certificates from Common Criteria and FIPS 140-2/3 frameworks.

Website Website PyPI DockerHub PyPI - Python Version Tests Codecov

Papers

Three publications accompany this project:

[!NOTE]

  • Janovsky, A., Jancar, J., Svenda, P., Chmielewski, Ł., Michalik, J., & Matyas, V. (2024). sec-certs: Examining the security certification practice for better vulnerability mitigation. Computers & Security, 143. https://doi.org/10.1016/j.cose.2024.103895
  • Janovsky, A., Chmielewski, Ł., Svenda, P., Jancar, J., Matyas, V. (2024). Chain of Trust: Unraveling References Among Common Criteria Certified Products. In: Pitropakis, N., Katsikas, S., Furnell, S., Markantonakis, K. (eds) ICT Systems Security and Privacy Protection. SEC 2024. IFIP Advances in Information and Communication Technology, vol 710. Springer, Cham. https://doi.org/10.1007/978-3-031-65175-5_14
  • Janovsky, A., Chmielewski, Ł., Svenda, P., Jancar, J., Matyas, V. (2025) Revisiting the analysis of references among Common Criteria certified products. Computers & Security, 152. https://doi.org/10.1016/j.cose.2025.104362

Installation

Use Docker with docker pull seccerts/sec-certs or just pip install -U sec-certs && python -m spacy download en_core_web_sm. For more elaborate description, see docs.

Usage

There are two main steps in exploring the world of security certificates:

  1. Data scraping and data processing all the certificates
  2. Exploring and analysing the processed data

For the first step, we currently provide CLI. For the second step, we provide simple API that can be used directly inside our Jupyter notebook or locally, together with a fully processed datasets that can be downloaded.

More elaborate usage is described in docs/quickstart. Also, see example notebooks either at GitHub or at docs. From docs, you can also run our notebooks in Binder.

If you are looking for the sources of the web-page at sec-certs.org look into the page branch of this repository.

Data scraping

Run sec-certs cc all for Common Criteria processing, sec-certs fips all for FIPS 140 processing.

Data analysis

Most probably, you don't want to fully process the certification artifacts by yourself. Instead, you can use our results and explore them as a data structure. An example snippet follows. For more, see example notebooks. Tip: these can be run with Binder from our docs.

from sec_certs.dataset import CCDataset

dset = CCDataset.from_web() # now you can inspect the object, certificates are held in dset.certs
df = dset.to_pandas()  # Or you can transform the object into Pandas dataframe
dset.to_json(
    './latest_cc_snapshot.json')  # You may want to store the snapshot as json, so that you don't have to download it again
dset = CCDataset.from_json('./latest_cc_snapshot.json')  # you can now load your stored dataset again

# Get certificates with some CVE
vulnerable_certs = [x for x in dset if x.heuristics.related_cves]
df_vulnerable = df.loc[~df.related_cves.isna()]

# Show CVE ids of some vulnerable certificate
print(f"{vulnerable_certs[0].heuristics.related_cves=}")

# Get certificates from 2015 and newer
df_2015_and_newer = df.loc[df.year_from > 2014]

# Plot distribution of years of certification
df.year_from.value_counts().sort_index().plot.line()

Authors

This work is being done at CRoCS MUNI by Adam Janovsky, Jan Jancar, Petr Svenda, Jiri Michalik, Lukasz Chmielewski and other contributors. This work was supported by the Internal grant agency of Masaryk University, CZ.02.2.69/0.0/0.0/19_073/0016943.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sec_certs-0.4.1.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sec_certs-0.4.1-py3-none-any.whl (205.0 kB view details)

Uploaded Python 3

File details

Details for the file sec_certs-0.4.1.tar.gz.

File metadata

  • Download URL: sec_certs-0.4.1.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sec_certs-0.4.1.tar.gz
Algorithm Hash digest
SHA256 5c6391823ddfd8f4f5eb50e9d1837a779b0b84b1ff8f02f3e9fa87819ffe8381
MD5 d8dd313bb484912a6a9d746cc1b329d2
BLAKE2b-256 5f72a1d13fa3c450c279d704b67fb724c213eb56574d2a56ba29979fa6912d34

See more details on using hashes here.

File details

Details for the file sec_certs-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: sec_certs-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 205.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sec_certs-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4a464efc546a4b5d02b0afef517ed3c70fd4f0e6a8075d690c49e1dd8a0be0fa
MD5 1bab79692fc5eb70155e1ad8e8a5a623
BLAKE2b-256 84a38cf34c2483971c271e0b86ab596c37f750520bbd71783cbfbe71edf162fe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page