Skip to main content

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:

Installation

sec-certs requires Python 3.10+ and is published on PyPI, so you can install it with any Python package manager, e.g.:

pip install -U sec-certs   # pip
uv add sec-certs           # uv, in a uv project
  • One of the dependencies (pdftotext) is compiled during installation, so you need Poppler and a C++ compiler first, see dependencies.
  • To convert PDFs with Docling instead of pdftotext, install the docling extra (sec-certs[docling]).

Alternatively, use Docker, where everything is already set up: docker pull seccerts/sec-certs. There are also variants with JupyterLab and the example notebooks (seccerts/sec-certs:latest-jupyter) and with Docling (seccerts/sec-certs:latest-docling).

For more details, see the installation 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.

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.

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.

Metadata

Release files for sec-certs 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sec-certs 0.5.2
File Size Uploaded Provenance Actions
sec_certs-0.5.2.tar.gz 2.2 MB Without provenance Details for sec_certs-0.5.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sec-certs 0.5.2
File Interpreter ABI Platform Actions
sec_certs-0.5.2-py3-none-any.whl Python 3 none any Details for sec_certs-0.5.2-py3-none-any.whl

Total release size: 2.5 MB

Release files / sec_certs-0.5.2.tar.gz

Download URL sec_certs-0.5.2.tar.gz
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
20857af9ffb753838601c85029bad294e20006e58d585ea65035dcea72a21055
BLAKE2b-256 checksum
How to use checksums
9e1e5760608b9d95a3cd3ebdd415ae18b809ddeead7e43399c1c1cbe620242f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","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}

Release files / sec_certs-0.5.2-py3-none-any.whl

Download URL sec_certs-0.5.2-py3-none-any.whl
Size 259.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
abf018699fb17042efb8e0c62f3353f80bbafd7711949022a30db4d4dd2cbb6c
BLAKE2b-256 checksum
How to use checksums
c40b53e8c3e699f7e2b74173476bbf3b566c256d8dd4589648f0840e5e3c95d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","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}

Security for sec-certs 0.5.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page