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

Sentry code triggering violation from Google manifest v3 during publication #14579

Closed
3 tasks done
rodolfoBee opened this issue Dec 4, 2024 · 3 comments
Closed
3 tasks done
Labels
Package: browser Issues related to the Sentry Browser SDK

Comments

@rodolfoBee
Copy link
Member

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/browser

SDK Version

8.9.1

Framework Version

No response

Link to Sentry event

No response

Reproduction Example/SDK Setup

No response

Steps to Reproduce

NA

Expected Result

No violation is to be triggered when using the NPM package as described here: https://docs.sentry.io/platforms/javascript/best-practices/shared-environments/

Actual Result

Violation report:

Technical Requirements - Additional Requirements for Manifest V3:
Violation:
Including remotely hosted code in a Manifest V3 item.
and
Having obfuscated code in the package.
Violating Content:
Code snippet:

 assets/index.html-wmZQQl7D.js: unction
getScriptURL(ar) { const rr = getClient(), cr = rr &&
rr.getOptions(), lr = cr && cr.cdnBaseUrl ||
"https://browser.sentry-cdn.com"; return new
URL(`/${SDK_VERSION}/${ar}.min.js`, lr).toString() } fr =
getScriptURL(cr), dr = WINDOW$4.document.
createElement("script"); dr.src = fr,"

It seems to be from this file: https://github.com/getsentry/sentry-javascript/blob/develop/packages/browser/src/utils/lazyLoadIntegration.ts

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Dec 4, 2024
@github-actions github-actions bot added the Package: browser Issues related to the Sentry Browser SDK label Dec 4, 2024
@Lms24
Copy link
Member

Lms24 commented Dec 5, 2024

We need more information to debug this:

  • What kind of application is the SDK used in? A browser extension?
  • How is this reproducible?

@getsantry getsantry bot removed the status in GitHub Issues with 👀 3 Dec 5, 2024
@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3 Dec 5, 2024
@getsantry getsantry bot moved this to Waiting for: Community in GitHub Issues with 👀 3 Dec 5, 2024
@getsantry getsantry bot moved this from Waiting for: Product Owner to Waiting for: Community in GitHub Issues with 👀 3 Dec 5, 2024
@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3 Dec 5, 2024
@getsantry getsantry bot moved this from Waiting for: Product Owner to Waiting for: Community in GitHub Issues with 👀 3 Dec 5, 2024
@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3 Dec 5, 2024
@getsantry getsantry bot moved this from Waiting for: Product Owner to Waiting for: Community in GitHub Issues with 👀 3 Dec 5, 2024
@getsantry getsantry bot moved this from Waiting for: Product Owner to Waiting for: Community in GitHub Issues with 👀 3 Dec 5, 2024
@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3 Dec 5, 2024
@getsantry getsantry bot moved this from Waiting for: Product Owner to Waiting for: Community in GitHub Issues with 👀 3 Dec 5, 2024
@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3 Dec 5, 2024
@getsantry getsantry bot moved this from Waiting for: Product Owner to Waiting for: Community in GitHub Issues with 👀 3 Dec 5, 2024
@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3 Dec 5, 2024
@getsantry getsantry bot moved this from Waiting for: Product Owner to Waiting for: Community in GitHub Issues with 👀 3 Dec 5, 2024
@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3 Dec 5, 2024
@getsantry getsantry bot moved this from Waiting for: Product Owner to Waiting for: Community in GitHub Issues with 👀 3 Dec 5, 2024
@ebloom19
Copy link

ebloom19 commented Dec 5, 2024

We need more information to debug this:

  • What kind of application is the SDK used in? A browser extension?
  • How is this reproducible?

Yes it is a browser extension listed in the Chrome Web Store. As of their manifest v3 restrictions it has flagged the mentioned points.

Unfortunately the only way to reproduce is to resubmit the extension to the web store and wait for the team to audit the update and either accept or reject.

Here is an example of a similar issue faced by another library.

PostHog/posthog-js#1394

@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3 Dec 5, 2024
@mydea
Copy link
Member

mydea commented Dec 5, 2024

This is likely a duplicate of #14010.

I'll close this in favor of that issue, feel free to add more thoughts there.

TLDR: This should be tree-shaken if you do not use it. What exact config/init is used, and what build config? This likely needs to be tree shaken out, so maybe something has to be configured in the bundler or similar 🤔

@mydea mydea closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: browser Issues related to the Sentry Browser SDK
Projects
Archived in project
Development

No branches or pull requests

4 participants