Title: Content Security Policy violations due to needing unsafe-eval for dbr-8.6.3.wasm.js · Issue #102 · Dynamsoft/barcode-reader-javascript · GitHub
Open Graph Title: Content Security Policy violations due to needing unsafe-eval for dbr-8.6.3.wasm.js · Issue #102 · Dynamsoft/barcode-reader-javascript
X Title: Content Security Policy violations due to needing unsafe-eval for dbr-8.6.3.wasm.js · Issue #102 · Dynamsoft/barcode-reader-javascript
Description: I am using dynamsoft-barcode-reader @8.6.3 in a web application built with React. We recently had a security audit of the application that recommended adding a stricter Content Security Policy. Due to the use of the eval function in the ...
Open Graph Description: I am using dynamsoft-barcode-reader @8.6.3 in a web application built with React. We recently had a security audit of the application that recommended adding a stricter Content Security Policy. Due...
X Description: I am using dynamsoft-barcode-reader @8.6.3 in a web application built with React. We recently had a security audit of the application that recommended adding a stricter Content Security Policy. Due...
Opengraph URL: https://github.com/Dynamsoft/barcode-reader-javascript/issues/102
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Content Security Policy violations due to needing unsafe-eval for dbr-8.6.3.wasm.js","articleBody":"I am using `dynamsoft-barcode-reader @8.6.3` in a web application built with React. We recently had a security audit of the application that recommended adding a stricter Content Security Policy. Due to the use of the `eval` function in the `wasm.js` file, we are unable to remove `unsafe-eval` from our content security policy, which the audit recommends.\r\n\r\nDo you have a way to avoid using the `wasm.js` script altogether, or do you have future plans to remove the use of `eval` in these JavaScript files?\r\n\r\nHere is the line where the import failure occurs when `unsafe-eval` is not part of the Content Security Policy:\r\n\r\n\r\nhttps://github.com/Dynamsoft/javascript-barcode/blob/3f4fc90c722d324b4aa453c13d7e60bb12a25eed/dist/dbr-8.6.3.worker.js#L25\r\n\r\n3 uses of `eval` in `dbr-8.6.3.wasm.js`:\r\nhttps://github.com/Dynamsoft/javascript-barcode/blob/3f4fc90c722d324b4aa453c13d7e60bb12a25eed/dist/dbr-8.6.3.wasm.js#L78\r\nhttps://github.com/Dynamsoft/javascript-barcode/blob/3f4fc90c722d324b4aa453c13d7e60bb12a25eed/dist/dbr-8.6.3.wasm.js#L120","author":{"url":"https://github.com/bbakerati","@type":"Person","name":"bbakerati"},"datePublished":"2021-10-21T16:16:14Z","url":"https://github.com/Dynamsoft/barcode-reader-javascript/issues/102"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:25a5dad3-d2fd-8eaf-c8f5-b43666d3902c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ABEC:2F4BD9:13FF78F:1A65FC1:6B0120D5 |
| html-safe-nonce | ea3ade550faf245cb12e1e2042e67ff320492f870a1f5626c4decdf07a4e1044 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQkVDOjJGNEJEOToxM0ZGNzhGOjFBNjVGQzE6NkIwMTIwRDUiLCJ2aXNpdG9yX2lkIjoiMzAwODY2MDU5MzA1OTExMTEyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e6113a99135579824ebf9f6e66f52f40161a964cac2252877abdad27d7ea6145 |
| hovercard-subject-tag | issue:1032683985 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/Dynamsoft/barcode-reader-javascript/102/issue_layout |
| twitter:image | https://opengraph.githubassets.com/83a105506012906aebaffff9b3adb7eed5b3bb593778a474222499d7152cc166/Dynamsoft/barcode-reader-javascript/issues/102 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/83a105506012906aebaffff9b3adb7eed5b3bb593778a474222499d7152cc166/Dynamsoft/barcode-reader-javascript/issues/102 |
| og:image:alt | I am using dynamsoft-barcode-reader @8.6.3 in a web application built with React. We recently had a security audit of the application that recommended adding a stricter Content Security Policy. Due... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bbakerati |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/Dynamsoft/barcode-reader-javascript git https://github.com/Dynamsoft/barcode-reader-javascript.git |
| octolytics-dimension-user_id | 5820187 |
| octolytics-dimension-user_login | Dynamsoft |
| octolytics-dimension-repository_id | 145683056 |
| octolytics-dimension-repository_nwo | Dynamsoft/barcode-reader-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 145683056 |
| octolytics-dimension-repository_network_root_nwo | Dynamsoft/barcode-reader-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width