Skip to content

SUPPLY-001C — Upgrade Firebase web SDK to the final 11.x compatibility set #202

Closed

Description

@daliu

Officer impact: No officer screen or procedure should change. This update replaces a vulnerable website dependency while preserving the same sign-in, account, Firestore, Functions, App Check, Analytics, and local-emulator behavior.

Officer documentation: None — this is a dependency-only compatibility boundary. Root security and operations records must still say exactly what was tested and whether anything was published.

Deployment evidence: None at issue creation. Closure must report the dependency graph, tests, merge, website publication, Firebase deployment, provider configuration, and production behavior as separate states. A green source workflow does not prove the updated website is live.

Problem

On exact main caae31ff427e91325d34a6c901faf81ad1dc49df, firebase declares ^10.7.1 and resolves to 10.14.1. A fresh Node 20 production audit reports 19 advisories: 1 critical, 5 high, 12 moderate, and 1 low. The Firebase/Firestore production graph reaches protobufjs@7.4.0, while the critical advisory covers versions through 7.6.2. Firebase 10 also brings the vulnerable undici@6.19.7 line into several client packages.

Firebase's official version 11 release notes say that v11 requires Node 18 or newer, emits ES2017 rather than ES5, and removes undici and node-fetch from its Node bundles: https://firebase.google.com/support/release-notes/js#version_1100_-_october_21_2024 . This repository already standardizes on Node 20 and modern browsers.

Atomic outcome

Upgrade exactly one Firebase web-SDK compatibility boundary:

  • firebase@11.10.0, the final stable 11.x release;
  • @firebase/rules-unit-testing@4.0.1, the matching Firebase 11 test peer;
  • one clean compatible lock graph with the production protobuf path at 7.6.3 or newer.

Do not jump to Firebase 12, add a direct protobuf workaround, run a forced audit rewrite, or mix Firebase Admin/Functions upgrades into this issue.

Security and compatibility invariants

  • The website keeps the existing modular Firebase API. No provider, project, emulator, Auth, Firestore, Functions, Analytics, or App Check configuration changes.
  • Browser development/test remains fail-closed to the Auth, Firestore, and Functions emulators.
  • App Check remains Enterprise-only and does not initialize on the initial private action/callback route.
  • Analytics remains suppressed on private callback/capability routes.
  • No Firebase 10 package remains in the application client graph, and the rules test package has a valid Firebase 11 peer.
  • The production graph contains no critical advisory and no unexplained new high advisory.
  • The lockfile contains only registry-resolved package metadata and integrity values. No override or direct transitive pin is added unless ordinary compatible resolution fails and a separately reviewed scope amendment is posted.
  • No secret, production record, real member, mailbox, payment, or provider call is used.

Scope

  • package.json
  • package-lock.json
  • minimum exact status updates in SECURITY.md, OPERATIONS_RUNBOOK.md, GITHUB_ISSUES.md, and GITHUB_ISSUE_SLICES.md

Existing runtime and test source are verification targets, not initially owned edit paths. If a real API incompatibility appears, stop, post the exact failure, and split or explicitly amend scope before editing runtime behavior.

Acceptance criteria

  • firebase is exactly 11.10.0 and @firebase/rules-unit-testing is exactly 4.0.1.
  • A fresh Node 20 lockfile install succeeds with no invalid peer dependency.
  • npm ls firebase @firebase/rules-unit-testing @grpc/proto-loader protobufjs --all shows one valid Firebase 11 client/test graph and production protobuf 7.6.3 or newer.
  • Before/after production audits are recorded; the root production audit has no critical finding and no unexplained new high finding.
  • Focused Firebase resource tests prove emulator isolation, Enterprise App Check, callback startup suppression, and callback Analytics suppression.
  • Full frontend Jest, SPA callback, Firestore Rules emulator, Functions, artifact/workflow safety, non-mutating lint, and diagnostic production build checks pass.
  • The optimized bundle diff is reviewed for unexpected server modules, credentials, or major unexplained growth.
  • Root security/operations/issue documentation states exact source/test/merge/live status without claiming the website, Firebase, or provider was changed.

Dependencies and coordination

Explicitly out of scope

  • Firebase 12, Firebase Admin/Functions SDK upgrades, CRA replacement, dependency bot/scanner workflows, audit-exception policy, SBOM, provider console changes, project migration, deployment, production data, or live verification.
  • Claiming the old development-tool graph is fully clean if Firebase CLI or another dev-only package retains a separate advisory.

Claim protocol

Creation is not a claim. Before editing, assign the issue, post CLAIMED by <canonical agent> at <UTC>; branch <branch>, and re-read live comments. Keep the change to this one compatibility boundary.

Activity

  1. self-assigned this
    on Jul 14, 2026
  2. added
    priority:P0Launch blocker or urgent security risk
    type:securitySecurity or privacy boundary
    area:firebaseFirebase services and data
    area:ciContinuous integration and deployment
    size:SSmall focused issue
    status:readyDependencies complete and ready to claim
    type:testingTest infrastructure and quality gates
    on Jul 14, 2026
  3. daliu commented on Jul 14, 2026

    @daliu
    ContributorAuthor

    CLAIMED by /root at 2026-07-14T01:27:19Z; branch codex/issue-202-firebase-11; exact base caae31f. Ownership is package.json, package-lock.json, and minimum SUPPLY-001C status hunks in SECURITY.md, OPERATIONS_RUNBOOK.md, GITHUB_ISSUES.md, and GITHUB_ISSUE_SLICES.md. Existing runtime/tests are verification-only unless a posted scope amendment is required. No Functions packages, runtime, workflow, provider, deploy, or officer files are owned.

  4. added
    status:in-progressClaimed and actively being implemented
    and removed
    status:readyDependencies complete and ready to claim
    on Jul 14, 2026
  5. daliu commented on Jul 14, 2026

    @daliu
    ContributorAuthor

    SCOPE AMENDMENT — compatibility red proof: with firebase@11.10.0 and @firebase/rules-unit-testing@4.0.1, all 4 Rules suites / 348 cases fail before rule evaluation because the Firebase 11 tester expects native fetch, while the repository’s Jest 27 Node VM does not expose the Node 20 fetch globals. The emulator is still exact loopback 127.0.0.1:8080; no provider call occurred. Add ownership of tests/firestore-rules/jest.config.js plus new tests/firestore-rules/node20-environment.js only. The custom environment will copy the host Node 20 native fetch, Headers, Request, Response, and FormData into the Jest sandbox, fail closed if any required primitive is absent, and make no Rules/runtime/provider change. The 348-case suite is the fail-before/pass-after proof. No other test or runtime source is added to scope.

  6. daliu commented on Jul 14, 2026

    @daliu
    ContributorAuthor

    SCOPE AMENDMENT (comment-only accuracy): add tests/firestore-rules/jest.setup.js solely to replace the stale Firebase 10/undici explanation with the verified Firebase 11 native-fetch/Jest-VM boundary. No executable line in that file changes.

  7. daliu commented on Jul 14, 2026

    @daliu
    ContributorAuthor

    EXTRACTION FINISHED — 2026-07-14T01:35:55Z

    Final exact source head: 30e560bd1492c1ba2f691ad0f7216a00bf59184f
    Exact base: caae31ff427e91325d34a6c901faf81ad1dc49df
    Final diff SHA-256: df343d36a6dc7cb2bb4577dabf52d89b580bd67e3748b67e5caa6ea13034022e

    Nine owned paths only. Local Node 20 proof is complete: focused Firebase/Auth/App Check 71/71, frontend 198/198, Firestore Rules 348/348, Functions 1,077/1,077 applicable unit tests, SPA callback 11/11, workflow/release safety 42/42, frontend lint exact baseline, Functions lint, and diagnostic build. Root production audit changes 19 findings (1 critical, 5 high) to 6 (0 critical, 3 high). Clean base/head builds reproduce main.fdd058b4.js 252.12 kB to main.56edbdb7.js 260.41 kB CRA gzip and 18,836 to 19,016 KiB overall. Built-output server/credential signature scan returned no paths. The new Rules environment uses Node 20 native web APIs and loopback emulator tests only.

    Three independent reviewers approve the final exact head. Their review corrected stale-cache bundle figures and two inaccurate test comments before approval. Exact-head hosted checks are running.

    No website publication, Firebase deployment, provider configuration, production data access, or live behavior occurred.

  8. added a commit that references this issue on Jul 14, 2026
    2c7332c
  9. daliu commented on Jul 14, 2026

    @daliu
    ContributorAuthor

    COMPLETE / CLAIM RELEASED — 2026-07-14T01:47Z

    PR #203 was admin-squash-merged to main as exact commit 2c7332ca547ba98a57863a6f2f41849ffb386e9f from independently approved source head 30e560bd1492c1ba2f691ad0f7216a00bf59184f.

    Exact-head CI run 29299213783 passed frontend lint/build/tests/SPA/release validation, Functions lint/tests, Firestore Rules, commerce-journal emulator, and artifact scrubber. Post-merge CI run 29299296970 passed the same five jobs on the exact merge commit. All acceptance checkboxes are complete, the in-progress label is removed, and the nine-path claim is released.

    Security result: root production audit 19→6; critical 1→0; high 5→3. Clean-build evidence is main.fdd058b4.js 252.12 kB → main.56edbdb7.js 260.41 kB CRA gzip and 18,836 → 19,016 KiB overall. Six root and nine Functions production findings remain open; dev-only older protobuf/undici tool paths remain explicitly documented.

    Deployment truth: source changed, tests passed, and code merged. A temporary Netlify PR preview was ready. No production website publication or exact runmprc.com revision was verified; no Firebase deployment occurred; no outside-provider setting or production data changed; live behavior was not tested. Those remain separate protected-release outcomes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:ciContinuous integration and deploymentarea:firebaseFirebase services and datapriority:P0Launch blocker or urgent security risksize:SSmall focused issuetype:securitySecurity or privacy boundarytype:testingTest infrastructure and quality gates

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions