Skip to content

Avoid hardcoding GitHub tarball URLs in dependencies β€” breaks private registry workflows #16311

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

Open
YashAggarwal21 opened this issue May 15, 2025 · 3 comments

Comments

@YashAggarwal21
Copy link

Problem Statement

Hi Sentry team πŸ‘‹,

We’re running into issues due to a dependency introduced in @sentry/[email protected] which references a GitHub tarball directly:
Reference PR - #16287

"@fastify/otel": "https://codeload.github.com/getsentry/fastify-otel/tar.gz/ae3088d65e286bdc94ac5d722573537d6a6671bb"

This causes real problems in environments like ours, where only private registries (e.g., AWS CodeArtifact) are allowed for security and compliance reasons.


Problem

Since this dependency is declared as a tarball URL:

  • npm and yarn bypass .npmrc registry settings.
  • The URL appears in package-lock.json, triggering CI validation errors like:
wrong registries appear in package-lock.json file:
https://codeload.github.com/getsentry/fastify-otel/tar.gz/...
  • The package cannot be fetched from our private registry, even though version @fastify/[email protected] exists there.
  • Our only workaround is to use overrides or resolutions, which we’d prefer to avoid.

Solution Brainstorm

Expected Behavior

We’d like to see Sentry declare the dependency as a semver range like:

"@fastify/otel": "^0.8.0"

This:

  • Respects .npmrc and private registries.
  • Still resolves the correct version.
  • Maintains security and reproducibility (e.g., you can pin @fastify/[email protected] in your lockfile).

Why This Matters

Many regulated environments prohibit installing packages from arbitrary URLs. Package managers like npm and yarn are designed to route semver-based dependencies through controlled registries, which allows:

  • Auditing
  • Mirror caching
  • Dependency tracking
  • Strict CI enforcement

Hardcoded tarball URLs break that model.

Ask

Would you consider:

  • Removing the tarball URL reference to @fastify/otel
  • Replacing it with a proper version (e.g., ^0.8.0)
  • Or publishing @fastify/otel to npm under the Sentry organization and referencing that

This small change would make Sentry easier to adopt in enterprise environments.

Thank you for the great work on the SDK!

@mydea
Copy link
Member

mydea commented May 15, 2025

Hey, thanks for raising this. We are on this and will change this to avoid the tarball in dependencies! cc @andreiborza

See: #16309

@andreiborza
Copy link
Member

Hi @YashAggarwal21, thank you for taking the time to write such detailed and well written issue!

This change has caused a bunch of problems, sorry for that :(. We're working on vendoring the package in which will hopefully resolve that issue.

I'm wondering if you can get around this issue for now by adding a resolutions entry to your package.json (depending on your package manager it's slightly different)

npm

"overrides": {
  "@fastify/otel": "getsentry/fastify-otel#otel-v1"
}

yarn

"resolutions": {
  "@fastify/otel": "getsentry/fastify-otel#otel-v1"
}

pnpm

"pnpm": {
  "overrides": {
    "@fastify/otel": "getsentry/fastify-otel#otel-v1"
  }
}

@matmannion
Copy link

Hi @YashAggarwal21, thank you for taking the time to write such detailed and well written issue!

This change has caused a bunch of problems, sorry for that :(. We're working on vendoring the package in which will hopefully resolve that issue.

I'm wondering if you can get around this issue for now by adding a resolutions entry to your package.json (depending on your package manager it's slightly different)

[...]

We're affected by this issue but unfortunately that wouldn't fix it for us either as it'd have a dependency on cloning the fork from Github, and we don't allow access to that (just a proxy to the npm registry).

Vendoring seems like the best solution here so we are left with pinning to old versions until this is implemented.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with πŸ‘€ 3 May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Product Owner
Development

No branches or pull requests

4 participants