Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content-Security-Policy (CSP) violations #50

Closed
koenpunt opened this issue Nov 19, 2016 · 4 comments
Closed

Content-Security-Policy (CSP) violations #50

koenpunt opened this issue Nov 19, 2016 · 4 comments

Comments

@koenpunt
Copy link
Contributor

It's currently not possible to use the HTML output without using at least

script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline';

Which isn't desired, and requires extra configuration when setting up a coverage page in Jenkins

@bf4
Copy link
Collaborator

bf4 commented Nov 22, 2016

@koenpunt could you give more information about the error you're seeing and how we might reproduce it? Thanks.

@koenpunt
Copy link
Contributor Author

I did setup Jenkins with the doclinks plugin so the coverage report is visible from within jenkins. However, due to the default CSP of Jenkins, the coverage report can't load certain javascript and css sources, required to correctly display the page.

This can be fixed by making the CSP rule less strict, but there are also certain optimizations which can done in this gem.

@beydogan
Copy link

I'm having the same issue on Jenkins while publishing results with HTML Publisher

Error is:

Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' 'unsafe-inline'".


    at O (application.js:1191)
    at r (application.js:1150)
    at HTMLTableElement.<anonymous> (application.js:1248)
    at Function.each (application.js:17)
    at init.each (application.js:17)
    at init.j.fn.dataTable (application.js:1237)
    at HTMLDocument.<anonymous> (application.js:1587)
    at Object.resolveWith (application.js:17)
    at Function.ready (application.js:17)
    at HTMLDocument.B (application.js:17)

@PragTob
Copy link
Collaborator

PragTob commented Feb 12, 2020

Merged and eleased soon.

@PragTob PragTob closed this as completed Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants