Repository navigation
Conversation
Update vulnerable dependencies to patched versions allowed by existing semver ranges (lockfile only), including: - handlebars 4.7.10, proxy-addr 2.0.8, websocket-driver 0.7.5, shell-quote 1.12.0 (criticals) - lodash 4.18.1, minimatch 3.1.5 / 5.1.9 / 9.0.9 - webpack 5.111.1, @babel/core 7.29.7, postcss 8.5.30, fast-uri 3.1.8, brace-expansion, nanoid, browserslist, js-yaml, picomatch, engine.io, socket.io, and others - express 4.22.3 and socket.io-adapter 2.5.8 to pick up patched body-parser, path-to-regexp, qs and ws Also: - ember-auto-import resolves to 2.13.1; devDependencies range aligned to ^2.10.0 - ember-cli-babel range raised to ^7.26.11 (already resolved) - Remove isbinaryfile 5.0.0 resolution; minimum node is now 20, so it resolves to 5.0.7 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The postMessage handoff accepted an OAuth result from any window and any origin. Any page loaded in the popup has a handle to the opener and can read the popup's window.name (the request key), so it could inject a token or code. - ui-service-mixin: ignore messages unless they come from our own origin and from the window we opened (new remoteWindow() hook; the iframe service returns its contentWindow). The window is remembered at open time because close() clears service.remote before late results arrive. - Parse result messages defensively so unrelated postMessages from other scripts no longer throw. - redirect.html: check the origin of the key reply, parse defensively, and declare `url` (it was an implicit global). - Lint inline scripts in public HTML with eslint-plugin-html. - Tests: unit tests for origin/source/malformed/late messages, and real-popup and iframe handoff tests (Chrome runs with --disable-popup-blocking). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- uuid-generator: build the popup id (the pending request key) from crypto.getRandomValues instead of Date.now() and Math.random(). Not crypto.randomUUID(), which needs a secure context. - random-url-safe: generate the OAuth `state` from crypto.getRandomValues, rejecting bytes that would bias the distribution. - oauth2-code: add refreshState() and call it at the start of open() in oauth2-code, oauth2-bearer and google-oauth2-bearer-v2, so each login attempt sends and checks a new state. A configured state is kept. - Tests: v4 uuid format, no Math.random, and a URL-to-state round trip (state sent is the state checked; a state from an earlier attempt is rejected). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oauth2-bearer (and google-oauth2-bearer, which extends it) and google-oauth2-bearer-v2 sent `state` but never checked it, so any token delivered for the open popup was accepted. - Read `state` from the redirect and reject a missing or mismatched value, using the same error as oauth2-code (moved into assertState()). - New `verifyState` provider setting (default true) to opt out for providers that do not echo `state`. - The returned token only contains the provider's responseParams, so the shape of authorizationToken (and of sessions that store it) is unchanged. - Tests: state read, match, mismatch, missing, opt-out and token shape for oauth2-bearer; new google-oauth2-bearer-v2 tests. The Google bearer integration mocks now echo state, as Google does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ceName - google-oauth2-bearer-v2: reject when the token validation request returns a non-2xx status or a body that is not JSON (or is null), instead of throwing inside onload and leaving the login pending. - providers/base and redirect-handler read the app-wide `remoteServiceName` through getConfiguration(). They read it from the module's default export, which is always an empty object, so the setting was ignored. The torii-callback initializer runs before the torii initializer, so it now calls configure() before the redirect handler runs. - Tests: google-v2 validation failures; base provider service selection; redirect handler does not close the window when using the iframe service. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ember-qunit 5 depended on ember-auto-import 1, which pulled in babel-core 6 and with it babel-traverse 6 (CVE-2023-45133, no fixed release) and json5 0.5.1 (CVE-2022-46175). ember-qunit 6 uses ember-auto-import 2. testem 3.16 (via ember-cli 4.8) also kept babel-core 6 installed as an optional peer of consolidate 0.16. Pin testem to 3.19.1, which uses consolidate 1.x. It is the last release that still supports Node < 20.19; 3.20 and later require Node ^20.19 || ^22.12 || >=24. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
can-symlink, fixturify-project and external-editor pin tmp 0.0.x (CVE-2025-54798, CVE-2026-44705) and have no release that updates it. They only use tmpNameSync, dirSync, fileSync and setGracefulCleanup, which tmp 0.2.x still provides, so override it for the whole tree. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ntime Patch-level/minor-in-0.x overrides for dev-toolchain advisories that don't require a major bump. Test-environment build verified. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Gaurav0
marked this pull request as ready for review
October 16, 2026 14:55
AndrewHYi
approved these changes
Oct 17, 2026
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.
Summary
Rebases our fork onto upstream adopted-ember-addons/torii v1.0.0 (
7dbaf64), fixes the dependency security advisories that can be fixed without a major version bump (including every finding linked to SCF-2442), and fixes the issues a security review found in our postMessage handoff and in torii's OAuth handling.Previously our fork was based on upstream from July 2023. Upstream has since dropped Node < 20, avoided the
Emberglobal, added@ember/stringas a dependency, switched from yarn to pnpm 10 and released 1.0.0.Commits
Our fork's changes, replayed onto v1.0.0 (unchanged)
a6f5f38,66dacf1,16e4083). When the app runs inside an iframe, browsers can partitionlocalStorage, so the popup and the opener don't see each other's storage.redirect.htmlnow also sends the redirect URL to the opener viapostMessage. If the popup can't read the pending request key fromlocalStorage, it asks the opener for it (getPendingRequestKey).ui-service-mixinlistens for those messages alongside the existingstoragelistener. Adds unit tests for the postMessage path.bump versioncommit (1.0.0-beta.2→1.0.0-beta.3) becausepackage.jsonis now at upstream's1.0.0.Security fixes (
75c23b9)These are mostly lockfile-only updates to patched versions that existing semver ranges already allow:
package.jsonchanges:ember-cli-babel^7.26.10→^7.26.11(already resolved to that version)ember-auto-importdevDependency range is aligned withdependencies(^2.10.0). The lockfile resolves 2.13.1.isbinaryfile: 5.0.0resolution. It was added to keep yarn installs working on older Node, and the minimum is now Node 20, so it resolves to 5.0.7.Remaining SCF-2442 findings (
f0aaf53,a42e645) and dev-toolchain overrides (b0a4b07)ember-qunit 5 → 6 (
f0aaf53). ember-qunit 5 pulled in ember-auto-import 1 → babel-core 6, which broughtbabel-traverse6 (CVE-2023-45133, no fixed release) andjson50.5.1 (CVE-2022-46175). ember-qunit 6 uses ember-auto-import 2. No test changes were needed.testem pinned to
~3.19.1(f0aaf53). testem 3.16 (via ember-cli 4.8) kept babel-core 6 installed as an optional peer of consolidate 0.16. 3.19.1 uses consolidate 1.x. It is the last testem that supports Node < 20.19; 3.20+ requires Node ^20.19 || ^22.12 || >=24.tmp forced to
^0.2.7(a42e645,pnpm.overrides). can-symlink, fixturify-project and external-editor pin tmp 0.0.x (CVE-2025-54798, CVE-2026-44705) and have no release that updates it. They only usetmpNameSync,dirSync,fileSyncandsetGracefulCleanup, which tmp 0.2.x still provides. The build, which runs can-symlink, and the tests pass.@babel/runtime,ansi-htmlanddecode-uri-componentoverrides (b0a4b07,pnpm.overrides).@babel/runtimeis forced to^7.26.10, which is within the same major.ansi-html(0.0.7 → 0.0.9) anddecode-uri-component(0.2.2 → 0.5.0) are 0.x bumps, used only by the dev toolchain (broccoli and sane). The test-environment build passes. Overrides only apply to this repo's own install; consumers still get ember-cli-babel 7's exact@babel/runtimepin (see "What's left").Overall,
pnpm auditgoes from 182 advisories (8 critical) to 37 (1 critical). Production dependencies go from 42 advisories to 2, with no criticals.SCF-2442
All 21 findings linked to SCF-2442 are fixed: the lockfile no longer resolves any of the vulnerable versions they name (COMP-10093 to COMP-10115).
This was checked against the lockfile. A FOSSA rescan is still needed to confirm the findings clear.
CI (
5614ac7)Disables the
ember-release,ember-betaandember-canaryember-try scenarios, which now test against Ember 7. LTS 3.28 through 5.12, classic, jQuery and Embroider scenarios still run.Security review fixes (
08fd322,8204c1c,41e2559,47fc3d4)08fd322). The postMessage handoff above accepted an OAuth result from any window on any origin. Any page loaded in the popup during login has a reference to the app window (window.opener), and can usually read the popup'swindow.name, which is the request key. So such a page could hand the app a token of its choosing. The mixin now ignores messages unless they come from our own origin and from the popup or iframe torii opened. Messages are parsed defensively, so unrelated postMessages from other scripts no longer throw.redirect.htmlalso checks the origin of the key reply and no longer leaksurlas a global. Addseslint-plugin-htmlso the script inredirect.htmlis linted.statefor each login (8204c1c). The popup id and the OAuthstateusedMath.random(); they now usecrypto.getRandomValues.statewas generated once and reused for every login attempt; it is now regenerated on eachopen(). Astateset in the configuration is still kept.statefor bearer/token providers by default (41e2559).oauth2-bearer, which the portal'sprimeprovider extends, sentstatebut never checked it. It now rejects a response whosestateis missing or doesn't match, as dogoogle-oauth2-bearerandgoogle-oauth2-bearer-v2. Providers whose server doesn't returnstatecan opt out withverifyState: falsein their provider config. The returnedauthorizationTokenhas the same shape as before, so saved sessions are unaffected. SCF's Doorkeeper returnsstateon the implicit-grant redirect, soprimeneeds no change.47fc3d4). google-oauth2-bearer-v2 now rejects, instead of hanging, when token validation returns an error status or a body that isn't JSON. The app-wideremoteServiceNamesetting is now honored: it was read from an always-empty default export.Behavior change for apps: test stubs that fake torii's popup for a bearer provider must now return the
statefrom the URL they were given, as a real server does. The portal has one such test; its fix is on the portal branch below.What's left
None of the remaining advisories affect code shipped to the browser. Torii's runtime code only imports Ember itself and
@ember/string. None of them is linked to SCF-2442. Fixing what remains requires major bumps:Testing
pnpm lintpassesember test: 182/182 passing locally, including after the ember-qunit 6, testem and tmp changes (pnpm buildalso succeeds; the ember-try matrix was not run locally; see the CI checks). These include new real-browser tests that open an actual popup onredirect.htmland check three things: the storage handoff, the postMessage handoff, and that a forged result from another window is ignored. There's also an iframe variant. Chrome now runs with--disable-popup-blockingso tests can open popups.CI=true): passes, after its one popup stub is updated to returnstate.After merging
The portal branch
gaurav/chore/SCF-2442-update-torii-security(SeeClickFix/portal#2169) is up to date with this PR: it points the portal'storiidependency at this PR's head (b0a4b07) and includes the test stub fix. After merging, update it to the merge commit or a tag.🤖 Generated with Claude Code