Content Security Policy Recommendation Bookmarklet October 14th, 2010

I wrote a bookmarklet that analyzes the content on the current page and recommends a Content Security Policy based on the types of content it finds on the page and the sources of that content. The implementation also takes into account resources that are dynamically added to the page by JavaScript.

For instance, today I learned that ReCAPTCHA loads script both from api.recaptcha.net, but also from www.google.com. Note to self: figure out why Google needs to know about every ReCAPTCHA load.

You can test it out by clicking the following bookmarklet: Recommend CSP

If you find it useful, drag it to your bookmarks toolbar and you can use it from any web page. Feel free to check out the bookmarklet source as well.

In the future, I would like to add notifications for potential inline script violations.

3 comments on “Content Security Policy Recommendation Bookmarklet

  1. Oliver says:

    I love it, thank you :-)

  2. Qbye says:

    Hi, you do a really good job! Thank you.

    You said “In the future, I would like to add notifications for potential inline script violations.”

    Have you done yet?

    Please email me, thanks again!!

  3. Qbye says:

    yep, i’ve find it in your new post.

    Thanks!!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 

Sharengeti
A community-driven collection of the best links on the Web, delivering a tailored browsing experience to each user.