chore: prune fcm-tester deps to fix alerts - #1134
Conversation
Greptile SummaryReplaces the FCM tester’s broad
Confidence Score: 5/5The PR appears safe to merge, with the FCM tester’s runtime, authentication API, and dependency metadata updated consistently. The selected Node version satisfies the new dependency’s engine requirement, the JWT migration preserves the token-generation flow, and no concrete blocking or non-blocking defect remains.
|
| Filename | Overview |
|---|---|
| tools/fcm-tester/index.js | Migrates the JSON import and JWT initialization to APIs compatible with Node 22 and google-auth-library 11 without changing the surrounding token flow. |
| tools/fcm-tester/package.json | Replaces the broad googleapis development dependency with the narrower authentication library. |
| tools/fcm-tester/package-lock.json | Regenerates the dependency tree around google-auth-library 11.0.0 and removes the unnecessary Google APIs transitives. |
| tools/fcm-tester/.nvmrc | Selects a Node 22 runtime satisfying the new authentication library’s engine requirement. |
| .github/dependabot.yml | Enables monthly npm dependency-update pull requests specifically for the FCM tester. |
Reviews (1): Last reviewed commit: "chore: add dependabot config to warnings..." | Re-trigger Greptile
|
@ovitrif I don't even remember using this tool, do you think we should keep it? |
ovitrif
left a comment
There was a problem hiding this comment.
Approved: the fcm-tester google-auth-library migration and Dependabot config are consistent and ready to merge.
This PR:
googleapiswithgoogle-auth-libraryin the FCM tester tool, clearing every open Dependabot alertdependabot.ymlfor the three ecosystems this repo has — thetools/fcm-testernpm tree, workflow actions, and the Gradle catalogDescription
All three open alerts, and both dismissed ones, came from
tools/fcm-tester/package-lock.json. Nothing vulnerable reaches the app: the scope is development and there are no Gradle findings.They were collateral from an over-broad dependency. The tool declared
googleapis, a meta-SDK for every Google API, but uses one thing from it —google.auth.JWT— which lives ingoogle-auth-libraryand is only re-exported.qsand oneuuidcame solely throughgoogleapis-common; the seconduuidcame from the oldergaxiosthatgoogle-auth-library9 depended on. Depending on the auth library directly resolves all of them with no pins,overridesor dismissals, and the regenerated lockfile also picks up the patchedjws, clearing the dismissed high-severity alert. The tree goes from 42 packages to 23.google-auth-library11 requires Node 22, so.nvmrcmoves offv20.15.1, end of life since April 2026. That forces a fix already overdue: the entry point imported the service account JSON withassert { type: "json" }, syntax removed in Node 22, so the tool would not start on any current runtime. TheJWTconstructor also became options-only, so the positional call was rewritten;authorizestill accepts a callback, so the promise wrapper is unchanged.Dependabot config
The repo has had alerts enabled for a long time but never a Dependabot pull request, because there was no config file. Hand-fixing advisories, as the first half of this PR does, is the work this is meant to stop from recurring.
Grouping is cost control:
ci.ymlandlint.ymlrun on every PR with no path filter, ande2e.ymlfires ongradle/**,*.gradle.ktsor its own workflow file. Ungrouped, six updates in a month is six full CI runs. npm and Gradle group minor and patch only, so majors fall through to their own PR. Actions need a second group because every one is pinned to a floating major tag, so a minor/patch group would never fire and each action would arrive separately.Two sets of Gradle coordinates are ignored. The
com.synonym:*artifacts resolve from credentialed GitHub Packages registries Dependabot cannot read, and move in lockstep with native code. The Kotlin toolchain — Kotlin, AGP, KSP, Compose compiler, stability analyzer, Compose BOM — is a compatibility matrix that took #1121 and #1127 to move deliberately; Dependabot resolves each coordinate independently with no view of it, so grouping would not help and only ignoring keeps it out. Everything else in the catalog updates normally. The rules useorg.jetbrains.kotlin:*rather than a looser prefix soorg.jetbrains.kotlinxpackages keep updating.Admin steps to finish enabling this
A config file only turns on version updates. Turning an advisory into a pull request is a separate repo setting. Merging this alone will not make alerts arrive as pull requests. Either tick Settings → Advanced Security → Dependabot security updates, or run the equivalent from the CLI. Both need admin and return
204 No Content:Verify afterwards:
Both return 404 for this PR's author, who has
maintainand notadmin, so the current state cannot be read from here and someone with admin has to run them. Alerts themselves are on — this PR exists because of three.Preview
N/A — developer tooling and repository configuration only.
QA Notes
Manual Tests
tools/fcm-tester/service-account.jsonpresent →nvm use && npm i→npm start: prints the access token banner followed by aya29.…token.regression:Paste that token into the Postman collection asbearerToken→ sendmessages/notification.jsonto a device token: notification arrives and logcat shows theFCMtag entry.gradle/libs.versions.toml.com.synonym:*and the Kotlin/AGP/KSP/Compose matrix are skipped as ignored, andorg.jetbrains.kotlinxpackages stay eligible.tools/fcm-tester/package-lock.jsonand does not look at the repo root.github-actions-majorPR rather than one per action;github-actions-minorproduces nothing.gh api --method PUTcommands above →automated-security-fixesreturnsenabled: true,paused: false.Automated Checks
npm auditreports 0 vulnerabilities on the regenerated lockfile, down from three open advisories, andnpm ls qs uuid googleapis googleapis-commonreturns empty for all four.node index.js tokennow fails only on the gitignoredservice-account.json, exercising the changed import, the JSON import attribute and theJWTconstruction.npx -y js-yaml .github/dependabot.ymlparses cleanly with the intended ecosystems, groups and ignore rules. Schema validity is otherwise enforced by GitHub, which annotates an invalid config on the PR.Linked Issues/Tasks