har2csp
har2csp is a command-line tool that generates Content Security Policy (CSP) headers from HTTP Archive (HAR) files. It analyzes the network requests in the HAR file and generates CSP directives that allow those requests, helping you to create a CSP for your website that doesn't break anything.
Installation
pip install har2csp
Usage
har2csp [-h] [-s SELF_URL] har_file_path
Positional Arguments
har_file_path: The path to the HAR file to generate CSP directives from.
Optional Arguments
-h, --help: Show a help message and exit.-s SELF_URL, --self-url SELF_URL: The URL of the website that the HAR file was recorded from. Any requests to this URL will be ignored when generating the CSP directives.
Example
har2csp -s https://www.example.com example.har
This command will generate CSP directives from example.har, ignoring any requests to https://www.example.com. The directives will be printed to the console.
License
This project is licensed under the terms of the Apache 2.0 Licence.
Metadata
Release files for har2csp 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| har2csp-1.0.0.tar.gz | 6.9 kB | Without provenance | Details for har2csp-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| har2csp-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for har2csp-1.0.0-py3-none-any.whl |
Total release size: 14.7 kB
Release files / har2csp-1.0.0.tar.gz
| Download URL | har2csp-1.0.0.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a3793e6f3aedc49921adf39d306902550cf8f7105ed39c31942c25c4ebeef1ae
|
|
BLAKE2b-256 checksum How to use checksums |
db9cf6827ca35f9763f88fbec3e4a5a80d867ce79efcfb21fc78aa6f4b7925cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / har2csp-1.0.0-py3-none-any.whl
| Download URL | har2csp-1.0.0-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
65b75f3587dab39c1a3334f7a14fe21f9e7e7c4956059350ddbe8e417f7b2a14
|
|
BLAKE2b-256 checksum How to use checksums |
b0a4b7452ff35801b176786a2e23eb3bcfefdfc2daeddc96d4832edf9197c150
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for har2csp 1.0.0
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.