Coder Social home page Coder Social logo

Hosting ScanJS with a CSP? about scanjs HOT 8 CLOSED

mozilla avatar mozilla commented on August 13, 2024
Hosting ScanJS with a CSP?

from scanjs.

Comments (8)

mozfreddyb avatar mozfreddyb commented on August 13, 2024

I agree that we should do that
I think the rewriting part is pretty easy and I'll try to do this today.

But we can't really apply a CSP in the HTTP Header as long as we host on GitHub :(
(and policies in meta tags aren't supported in Firefox yet, see https://bugzil.la/663570)

from scanjs.

mozfreddyb avatar mozfreddyb commented on August 13, 2024

The rewriting bits have been fairly easy. The reason why this is already merged is discussed in #26.

Leaving this open to discuss hosting and headers, although it should already works with Blink/WebKit browsers (tested chromium 32)

from scanjs.

pauljt avatar pauljt commented on August 13, 2024

Sorry I didn't realise you guys actually worked on this - commented the meta-tag in the last commit. I'll remove the CSP which I commented out ;)

from scanjs.

pauljt avatar pauljt commented on August 13, 2024

Done

from scanjs.

pauljt avatar pauljt commented on August 13, 2024

Why do we need eval btw? Just curious ?

from scanjs.

pwnetrationguru avatar pwnetrationguru commented on August 13, 2024

TL;DR - I think because of acorn.js
According to freddyb, "but we have to allow eval/Function because of acorn.js :(".

from scanjs.

mozfreddyb avatar mozfreddyb commented on August 13, 2024

Not only acorn. scan.js also uses Function.
We can also use this issue to discuss making the rules stricter. I'm sure this could be doable.

from scanjs.

mozfreddyb avatar mozfreddyb commented on August 13, 2024

This is partially covered with #65, but not quite..

from scanjs.

Related Issues (20)

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.