Generator for certificate reports conformant with CCADB IR Guidelines
Project description
Dossier
Dossier is an application that generates certificate reports that conform to the format specified in the CCADB Incident Reporting Guidelines. The application accepts individual PEM- or DER-encoded certificate files, CSV files containing PEM-encoded certificates, or ZIP archives containing certificate files in any of these formats. The application then reads the certificates, fetches CRL-based revocation status, and generates a full CSV-formatted report or a summarized crt.sh link list, depending on the number of certificates.
Installation
-
Python 3.10 or newer must be installed. Python can be downloaded and installed from https://www.python.org/downloads/, or use your operating system's package manager.
-
To ensure that package dependencies for Dossier do not conflict with globally installed packages on your machine, it is recommended that you use pipx to create a separate Python environment for Dossier. Follow the instructions on the pipx homepage to install pipx.
-
Use pipx to install Dossier:
pipx install cert-dossier
Once installed, the bundled command line application will be available on your machine.
Usage
Required Arguments
Dossier requires several arguments to be supplied:
incident_discovery_datetime: The ISO 8601 timestamp when the incident was discovered. This is used to determine if a certificate was revoked in a timely manner. Documentation for the expected format can be found here. Example:20250729T150000Zrevocation_window: The maximum allowed time between the discovery of an incident and the certificate revocation. Allowed values are24H,5D, or7D.input_files: One or more paths to files containing certificates. These paths can be for CSV files, PEM and DER files, or a ZIP file containing these types of files.
There are a few caveats to note regarding the input_files argument:
- File extensions are used to determine the file type. Supported extensions are
.csv,.pem,.cer,.crt,.der, and.zip. This behavior may change in the future to instead use magic numbers to determine the file type. - CSV files must contain a column named
PEMorpemthat contains PEM-encoded certificates. Other columns in the CSV file are ignored. - Concatenated PEM files are (currently) not supported.
Optional Arguments
The following optional arguments can be supplied:
--full-report-threshold: The maximum number of certificates to process before switching to generating a crt.sh link list instead of a full report. Default is10000.--hide-progress: If specified, the progress bar will not be displayed during processing.--output-file: The path to the output file. If not specified, output will be printed to standard output.--log-file: The path to a log file. If not specified, logs will be printed to standard error.--log-level: The logging level. Allowed values areDEBUG,INFO,WARNING,ERROR, andCRITICAL. Default isINFO.
Example Invocations
-
Generate a report for an incident discovered on 2025-07-29 at 15:00:00 UTC with a 24-hour revocation window with certificates in
cert1.pem,cert2.cer, andcerts.zip, printing the report to standard output without displaying a progress bar:dossier 20250729T150000Z 24H cert1.pem cert2.cer certs.zip --hide-progress
-
Generate a report for an incident discovered on 2025-07-29 at 15:00:00 UTC with a 5-day revocation window with certificates in
certs.csv, writing the report toreport.csvand logging debug information todossier.log:dossier 20250729T150000Z 5D certs.csv --output-file report.csv --log-file dossier.log --log-level DEBUG
Processing
Once the required and optional arguments are supplied, Dossier will process the input files and generate a report. The processing steps are as follows:
- Fetch V4 All Certificate Information (root and intermediate) in CCADB (CSV).
- Fetch
AllCertificatePEMsCSVFormatfor each year from 1996 (the earliest year that a valid certificate exists) up to and including the current year. - Read in the supplied input files and extract certificates.
- For each certificate, fetch CRL-based revocation status by determining the issuer of the certificate and downloading the relevant CRL(s) using the CRL URI(s) disclosed in CCADB.
- Using the incident discovery date/time, revocation window, and revocation status, determine the revocation status (expired, timely revoked, delayed revocation, valid but planned to be revoked).
- Output statistics as a series of INFO-level log messages, which provide comprehensive information about the certificates processed.
- Generate a report in CSV format or a crt.sh link list, depending on the number of certificates processed and the value of the
--full-report-thresholdoption.
Some Notes on the Full Report Format
The CCADB Incident Reporting Guidelines provide a rigorous format for the full report. However, some design decisions were made in the implementation of Dossier that may not be immediately obvious. These decisions are documented here for clarity:
- All end-entity S/MIME certificates (those with an Extended Key Usage of
emailProtection) have theirSubjectlisted asREDACTED, as these certificates (almost) always contain personal information such as email addresses or names. - A space is used to delimit SHA-256 hashes and DNS names.
- The string representation of subject and issuer DNs is generated using the
rfc4514_string()method from thecryptographypackage. The use of short names or the "raw" OID format may change depending on the version of thecryptographypackage installed.
Bugs?
If you find a bug or other issue with Dossier, please create a GitHub issue.
Contributing
As we intend for this project to be an ecosystem resource, we welcome contributions. It is preferred that proposals for new features be filed as GitHub issues so that design decisions, etc. can be discussed before submitting a pull request.
This project uses Black code formatter. The CI/CD pipeline checks for compliance with this format, so please ensure that any code contributions follow this format.
Acknowledgements
Dossier is built on several open source packages. In particular, these packages are dependencies of this project:
| Name | License | Author | URL |
|---|---|---|---|
| cryptography | Apache Software License; BSD License | The Python Cryptographic Authority and individual contributors | https://github.com/pyca/cryptography |
| httpx | BSD 3-Clause "New" or "Revised" License | Encode OSS Ltd. | https://github.com/encode/httpx |
| python-dateutil | Apache Software License; BSD License | Gustavo Niemeyer | https://github.com/dateutil/dateutil |
| tqdm | MIT License | tqdm contributors | https://github.com/tqdm/tqdm |
The Dossier maintainers are grateful to the authors of these open source contributions.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cert_dossier-1.0.0.post1.tar.gz.
File metadata
- Download URL: cert_dossier-1.0.0.post1.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2fd4cd76d606aa5f897b5a25d4da89ded85749907ebbed7000ef702a8bcb7c0
|
|
| MD5 |
605de96e45a1d327183021f4e2cf6ed8
|
|
| BLAKE2b-256 |
772d8674d55fc69b7e993f2f0f98e61e270fee4e763374b65f5117294a5ad1d4
|
Provenance
The following attestation bundles were made for cert_dossier-1.0.0.post1.tar.gz:
Publisher:
ci_cd_pipeline.yaml on digicert/dossier
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cert_dossier-1.0.0.post1.tar.gz -
Subject digest:
b2fd4cd76d606aa5f897b5a25d4da89ded85749907ebbed7000ef702a8bcb7c0 - Sigstore transparency entry: 604984011
- Sigstore integration time:
-
Permalink:
digicert/dossier@61f5b005ea7d28d9632ae887503e3133592bae35 -
Branch / Tag:
refs/tags/v1.0.0.post1 - Owner: https://github.com/digicert
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci_cd_pipeline.yaml@61f5b005ea7d28d9632ae887503e3133592bae35 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cert_dossier-1.0.0.post1-py3-none-any.whl.
File metadata
- Download URL: cert_dossier-1.0.0.post1-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a353a2f9930535657c6a534eed4aad6eb5530dd01b6faabe0e41bd3c16a0b96
|
|
| MD5 |
94997749583f170bf56336edb855f5b6
|
|
| BLAKE2b-256 |
dcf04710935abd926b494579778bdd6a1fe3f85f35bc8b05f4cb293902d202d9
|
Provenance
The following attestation bundles were made for cert_dossier-1.0.0.post1-py3-none-any.whl:
Publisher:
ci_cd_pipeline.yaml on digicert/dossier
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cert_dossier-1.0.0.post1-py3-none-any.whl -
Subject digest:
3a353a2f9930535657c6a534eed4aad6eb5530dd01b6faabe0e41bd3c16a0b96 - Sigstore transparency entry: 604984013
- Sigstore integration time:
-
Permalink:
digicert/dossier@61f5b005ea7d28d9632ae887503e3133592bae35 -
Branch / Tag:
refs/tags/v1.0.0.post1 - Owner: https://github.com/digicert
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci_cd_pipeline.yaml@61f5b005ea7d28d9632ae887503e3133592bae35 -
Trigger Event:
release
-
Statement type: