Git Product home page Git Product logo

csp-generator-extension's Introduction

Google Chrome Extension for 4ARMED's Content Security Policy Generator

This is a Google Chrome Extension for interacting with 4ARMED's CSP Generator.

Installation

  1. Clone this repository

    $ git clone https://github.com/4armed/csp-generator-extension
  2. Enable Developer Mode in chrome://extensions

  3. Load unpacked extension from the cloned csp-generator-extension directory.

Things to consider

We highly recommend you create a new Google Chrome user for this extension. The reasons are two-fold:

  1. We need a lot of permissions in order to run this extension:

      "permissions": [
     "webRequest",
     "webRequestBlocking",
     "http://*/*",
     "https://*/*",
     "storage",
     "tabs"
    ],
    

You can see the code for yourself, it's perfectly benign but it's alpha-level code and could break things so it may not be something you are comfortable installing into your main profile with all your Internet Banking, etc :-)

  1. It removes existing CSP headers for all responses, not per site. It's therefore best to work on one site at a time or you'll end up with the CSP for one site creating violations on another.

Configuration

There are only two options for this extension, both can be configured from the chrome://extensions page by clicking Options.

  1. CSP Generator URL

    By default this will use our live deployment at https://csp.4armed.io. If you are running your own copy, perhaps in Docker somewhere, set the URL here. Make sure you don't include the trailing slash in the URL and ensure the URL points to the root of the installation. Basically the value is appended with /report and /policy for the different actions.

  2. Unsafe

    By default, when you generate a CSP using the API it will not include unsafe-inline or unsafe-exec. If you want to include these you need to pass ?unsafe=1 to the API and this can be done by ticking the checkbox for this option.

Using

See the video on YouTube at https://youtu.be/nr5PFxDm3uo. It really is the easiest way to see what it does!

Fork it!

Please do feel free to submit changes. Please fork this repo and send a pull request from a dedicated branch.

csp-generator-extension's People

Contributors

marcwickenden avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.