Skip to content

Conversation

@stephmilovic
Copy link
Contributor

@stephmilovic stephmilovic commented Aug 4, 2025

Summary

The domtoimage.toPng method caused the following CSP related errors when attempting to export PDF from the EASE Value Report:

core.entry.js:1 domtoimage: Error while reading CSS rules from https://kibana.estccdn.com/29ed9d1b5e7a/ui/legacy_light_theme.min.css SecurityError: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules

kbn-ui-shared-deps-npm.dll.js:1 Refused to connect to 'data:image/png;base64,.....' because it violates the following Content Security Policy directive: "connect-src 'self' https:".

Using domtoimage.toBlob fixes the error.
#222757

To test

There is an identical branch with a deployment being used for demo. Test the export on that branch to ensure export pdf works on cloud serverless instance (previously we only tested locally, leading to the bug)

@stephmilovic stephmilovic added the release_note:skip Skip the PR/issue when compiling release notes label Aug 4, 2025
@stephmilovic stephmilovic requested a review from a team as a code owner August 4, 2025 20:33
@stephmilovic stephmilovic added Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Security Generative AI Security Generative AI backport:version Backport to applied version labels v9.2.0 labels Aug 4, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 10.3MB 10.3MB +39.0B

@stephmilovic stephmilovic merged commit a137195 into elastic:main Aug 5, 2025
42 checks passed
delanni pushed a commit to delanni/kibana that referenced this pull request Aug 5, 2025
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Aug 7, 2025
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 230478 locally
cc: @stephmilovic

@stephmilovic stephmilovic added backport:skip This PR does not require backporting and removed backport missing Added to PRs automatically when the are determined to be missing a backport. backport:version Backport to applied version labels labels Aug 7, 2025
@wildemat wildemat mentioned this pull request Aug 7, 2025
10 tasks
NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Security Generative AI Security Generative AI Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants