Skip to content

Remove unused posthog-node dependency - #501

Merged
psugihara merged 2 commits into
mainfrom
remove-unused-posthog-node
Jul 8, 2026
Merged

Remove unused posthog-node dependency#501
psugihara merged 2 commits into
mainfrom
remove-unused-posthog-node

Conversation

@psugihara

Copy link
Copy Markdown
Collaborator

Context

Alternative to #497. That PR bumps posthog-node 2.x → 4.x to pull in a patched axios (CVE-2023-45857, XSRF-TOKEN leak).

What this does instead

posthog-node is never imported anywhere in the repo:

  • The only PostHog code — packages/cli/src/util/analytics/providers/Posthog.ts — talks to the PostHog HTTP API via node-fetch directly, not the SDK.
  • The telemetry that originally pulled in the dep was removed in Remove email capture, usage tracking #489.

So rather than upgrade a dead dependency, this removes it. Regenerating the lockfile drops posthog-node, its transitive axios@0.27.2 + follow-redirects@1.15.3, and rusha entirely — eliminating the vulnerable axios supply chain completely instead of trading 0.27 for 1.7.

Notes

@changeset-bot

changeset-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 947b130

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
mailing-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
mailing-web Ignored Ignored Preview Jul 8, 2026 2:48am

psugihara added 2 commits July 7, 2026 19:47
posthog-node was declared in packages/core but never imported anywhere.
The only PostHog usage (packages/cli analytics provider) talks to the
HTTP API via node-fetch directly, and the telemetry that originally
motivated the dep was removed in #489.

Dropping it eliminates the transitive axios@0.27 (and rusha) supply
chain entirely, which also resolves the axios XSRF-TOKEN advisory
(CVE-2023-45857) that #497 aimed to address by bumping the package.
@psugihara
psugihara force-pushed the remove-unused-posthog-node branch from 82da198 to 947b130 Compare July 8, 2026 02:48
@psugihara
psugihara merged commit 642c70a into main Jul 8, 2026
14 of 21 checks passed
@psugihara
psugihara deleted the remove-unused-posthog-node branch July 8, 2026 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant