Repository navigation
Conversation
Build real projects with SRI on and check each integrity hash against the file on disk, after the Sentry code injection. Bundler plugins: webpack 5 (webpack-subresource-integrity), Vite 4, 7 and 8 (vite-plugin-sri3), Rollup 3 and 4 and Rolldown (rollup-plugin-sri), and esbuild (an `onEnd` SRI plugin). Each runs with a source map upload and with `disable-upload`, and with the Sentry plugin before and after the SRI plugin. SDKs: Next.js 16 `experimental.sri` (Turbopack and webpack, delete and manual upload) and Nuxt 4 with `nuxt-security` SRI.
Remove the new Next.js and Nuxt e2e variants. The SRI checks now run in builds that CI already has: - `nextjs-16` already sets `experimental.sri`. Its SRI test now also compares the hashes with the files, for Turbopack and webpack. - `nextjs-16-sourcemaps` turns on SRI in the manual upload variants. - `nuxt-4-sourcemaps` adds `nuxt-security` SRI to the static variant. Add `findHtmlIntegrities` and `findSubresourceIntegrityMismatches` to `@sentry-internal/test-utils` for these checks. Keep the plugin order test only for esbuild, where the order changes the result. Vite, Rollup and Rolldown keep one test per mode.
Contributor
size-limit report 📦Compared: 733027c (PR test merge using develop at 6dab20b) Against: 6dab20b (develop) · base run #68250 ✅ Baseline matches: this diff contains only this PR's changes.
|
Contributor
Optional E2E testsSome optional checks were not successful. They do not block the merge. 1 not successful, 63 successful. See the run.
Successful checks
|
timfish
marked this pull request as ready for review
November 28, 2026 13:31
javascript-sdk-gitflow
Bot
requested review from
chargome,
nicohrubec and
s1gr1d
November 28, 2026 13:31
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds tests that build real projects with SRI on and check each integrity hash against the file on disk after the Sentry injection. They cover webpack 5, Vite 4/7/8, Rollup 3/4, Rolldown and esbuild, plus Next.js 16
experimental.sri(Turbopack and webpack) and Nuxt 4 withnuxt-security. The SDK checks run in existing e2e builds, so the e2e matrix does not grow. A sharedfindSubresourceIntegrityMismatcheshelper is added to@sentry-internal/test-utils.A change that moves code injection or debug ID stamping after the point where the hashes are computed would silently break SRI for users. The tests cover only setups that work today. Testing also found these setups that break SRI, which this PR does not fix:
subResourceIntegrityandsentryOnBuildEnd: the CLI inject runs after React Router writes its hashes, in every source map mode.useRunAfterProductionCompileHook: true, and Turbopack withturbopack.debugIds: false: the CLI inject runs after Next.js hashes the files.sourcemaps.disable: 'disable-upload'when the Sentry plugin comes after an SRI plugin: ouronEndrewrites the files after they were hashed.onEnd: we replace the debug ID placeholder on disk at that time.Next.js webpack builds hash
_ssgManifest.jsbefore writing the final file, also without Sentry, so the checks skip that file.Generated by Claude Code