-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Timeline report not rendering in Jenkins HTML report without loosening CSP even more #1890
Comments
@ismail-s no particular reason. see if you can contribute a PR to expedite |
Thanks very much. |
@ismail-s thank you for the PR. I'll keep this open and close it when we release 1.2.0 final (process we follow) |
@ismail-s we actually release 1.2.0.RC4 today, so you will be able to use it from maven etc. let me know if it works ok |
@ptrthomas Thanks. I've given it a try and the timeline report is now rending correctly. |
1.2.0 released |
Scenario
Expected
Timeline report is displayed correctly
Actual
A mostly blank page is displayed:
Further info/discussion
What's happening is that Jenkins sends a content security policy header. We've actually previously loosened this to show the HTML reports, by setting the CSP header to
default-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' 'unsafe-inline' data:;
.However, I've noticed that this isn't working for karate-timeline.html , as that references vis.min.js & vis.min.css from a CDN:
karate/karate-core/src/main/java/com/intuit/karate/report/karate-timeline.html
Lines 11 to 12 in 5050e30
Contrast this to karate-feature.html , which does this
karate/karate-core/src/main/java/com/intuit/karate/report/karate-feature.html
Lines 9 to 11 in 5050e30
We could loosen our CSP even more to allow stuff from https://cdnjs.cloudflare.com, but I think it would make more sense to not fetch the vis dependency from a CDN in the first place, and to add it to this repo like is done for other deps like jquery & bootstrap. Was there a reason why this wasn't done at the time, or couldn't be done?
Thanks in advance,
Ismail
The text was updated successfully, but these errors were encountered: