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.
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:
- Data scraping and data processing all the certificates
- 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.
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_latest() # 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()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sec-certs-0.2.1.tar.gz
.
File metadata
- Download URL: sec-certs-0.2.1.tar.gz
- Upload date:
- Size: 3.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5afe3ebde293a747d4023d3931c8c008cb0d0c9c64518e2f2e7e4b78cefa5e93 |
|
MD5 | 914896ef6c93adfad0efcfe6deebf18b |
|
BLAKE2b-256 | b489349f49053e5b604e93ec8470657f2ec30c8749642d6200d2fc1eb31334ce |
File details
Details for the file sec_certs-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: sec_certs-0.2.1-py3-none-any.whl
- Upload date:
- Size: 700.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fadc8b20ebe4eef7760987b770a8834ee9ddb56a839ea07ce994f47134c4938e |
|
MD5 | aa7bc562772709c1803d3397316bf82e |
|
BLAKE2b-256 | 89ae155bb4c7789d2550b9401d245404ee8bd54c9055f5895e0d77394ae1ba24 |