# Cspparse | A Tool To Evaluate Content Security Policies

**URL:** <https://onehack.st/t/cspparse-a-tool-to-evaluate-content-security-policies/220784>\
**Category:** Tools & Scripts\
**Tags:** tools, programming, freebies\
**Created:** [July 5, 2022, 10:53pm UTC](https://onehack.st/t/cspparse-a-tool-to-evaluate-content-security-policies/220784 "2022-07-05T22:53:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BlueHacker](https://onehack.st/user_avatar/onehack.st/bluehacker/32/174721_2.png) [@BlueHacker](https://onehack.st/u/BlueHacker)\
**Post date:** [July 5, 2022, 10:53pm UTC](https://onehack.st/t/cspparse-a-tool-to-evaluate-content-security-policies/220784/1 "2022-07-05T22:53:01Z")

</div>

![image](https://onehack.st/uploads/default/original/3X/3/d/3dac0f38f47ba7f0e2d437575ac6b5d0433063ba.png)

## Description

cspparse is a tool to evaluate Content Security Policies. It uses Google’s API to retrieve the CSP Headers and returns them in [ReconJSON](https://github.com/ReconJSON/ReconJSON) format. Not only does it check for headers with Google’s API, it also parses the target site’s HTML to look for any CSP rules that are specified in the `<meta>` tag

## Installation

### Install Command and Download Source With Go Get

`cspparse` command will be installed to `$GOPATH/bin` and the source code (from `https://github.com/lc/cspparse`) will be found in `$GOPATH/src/github.com/lc/cspparse` with:

~ ❯ go get -u [github.com/lc/cspparse](http://github.com/lc/cspparse)

### Install from Source

~ ❯ git clone [https://github.com/lc/cspparse](https://github.com/lc/cspparse) ~ ❯ cd cspparse ~ ❯ go build

## Usage

~ ❯ cspparse \<domain / url\>

### Example

~ ❯ cspparse [https://www.facebook.com](https://www.facebook.com)

### Docker

~ \> docker build -t cspparse .

Run

~ \> docker run --rm -t cspparse \<domain / url\>

## GitHub:

> **[GitHub - lc/cspparse: A tool to evaluate Content Security Policies.](https://github.com/lc/cspparse)**
>
> A tool to evaluate Content Security Policies.
