Skip to content

security(deps): pin @asyncapi packages to non-compromised versions#316

Merged
alexander-sei merged 2 commits into
mainfrom
security/pin-asyncapi-safe-versions
Jul 22, 2026
Merged

security(deps): pin @asyncapi packages to non-compromised versions#316
alexander-sei merged 2 commits into
mainfrom
security/pin-asyncapi-safe-versions

Conversation

@alexander-sei

Copy link
Copy Markdown
Contributor

Summary

Hardens sei-js against the 2026-07-14 AsyncAPI npm supply-chain
compromise
("Miasma RAT", dropped via a post-install sync.js) by
pinning the affected @asyncapi/* packages to their latest
non-compromised versions through pnpm.overrides.

Background

During a ~4-hour window on 2026-07-14, these versions were malicious:

Package Compromised Latest safe (pinned)
@asyncapi/specs 6.11.2 6.11.1
@asyncapi/generator 3.3.1 3.3.0
@asyncapi/generator-helpers 1.1.1 1.1.0
@asyncapi/generator-components 0.7.1 1.0.0

How sei-js is exposed

sei-js has no direct @asyncapi dependency, but the mint (Mintlify)
docs CLI pulls it transitively:

mint → @asyncapi/parser@3.4.0 → @asyncapi/specs "^6.8.0"

That ^6.8.0 range floats, so a fresh install or lockfile
regeneration could have resolved the compromised 6.11.2. No
compromised version was ever actually in pnpm-lock.yaml (it was
pinned at 6.10.0), and the generator* packages are not in the tree
at all.

What changed

  • package.json: added a pnpm.overrides block pinning the four
    packages above.
  • pnpm-lock.yaml: @asyncapi/specs 6.10.0 → 6.11.1 (the only
    resolved version change) + the recorded overrides section.
  • The generator* pins add no packages — they're defense-in-depth
    so the compromised releases can never enter the tree if AsyncAPI
    codegen is adopted later.
  • Other deprecated: lines in the lockfile diff are registry metadata
    pnpm refreshed during the rewrite — no versions or integrity hashes
    changed.

Verification

  • pnpm install --lockfile-only is idempotent (second run = no further
    changes) → --frozen-lockfile CI will pass.
  • @asyncapi/specs now resolves to a single version, 6.11.1.
  • No compromised version string exists anywhere in the lockfile.

Notes

  • No changeset needed: the override affects only the workspace
    dev/CI install (docs tooling); it is not published into any package's
    metadata, so consumers of sei-js packages are unaffected.

🤖 Generated with Claude Code

Several AsyncAPI npm packages were briefly compromised on 2026-07-14
(the "Miasma RAT" supply-chain incident, delivered via a post-install
sync.js dropper). sei-js pulls @asyncapi/specs transitively through
mint -> @asyncapi/parser, whose "^6.8.0" range can float up into the
compromised 6.11.2 on any fresh install or lockfile regeneration.

Pin the four affected packages to their latest non-compromised
versions via pnpm.overrides so no install can resolve a malicious
release:

  @asyncapi/specs                6.11.1   (in tree: 6.10.0 -> 6.11.1)
  @asyncapi/generator            3.3.0    (preventive; not in tree)
  @asyncapi/generator-helpers    1.1.0    (preventive; not in tree)
  @asyncapi/generator-components 1.0.0    (preventive; not in tree)

No compromised version was ever present in the lockfile. The only
resolved change is @asyncapi/specs 6.10.0 -> 6.11.1; the generator
pins are defense-in-depth in case that toolchain is introduced later.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7b6a0d0

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

This PR includes changesets to release 6 packages
Name Type
@sei-js/create-sei Patch
@sei-js/ledger Patch
@sei-js/mcp-server Patch
@sei-js/precompiles Patch
@sei-js/registry Patch
@sei-js/sei-global-wallet 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

@cursor

cursor Bot commented Jul 20, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Dependency and lockfile-only hardening for dev/docs tooling; no runtime or published package behavior changes.

Overview
Supply-chain hardening after the 2026-07-14 AsyncAPI ("Miasma RAT") incident: root package.json now defines pnpm.overrides so @asyncapi/specs cannot resolve to compromised 6.11.2 when installs or lockfile regeneration pull it in via the Mintlify docs toolchain (mint@asyncapi/parser). The lockfile’s only real version move is @asyncapi/specs 6.10.0 → 6.11.1; @asyncapi/generator, generator-helpers, and generator-components are pinned as defense-in-depth even though they are not in the tree today.

Workspace version is bumped to 2.0.1 with CHANGELOG.md and a changeset that patch-releases all six @sei-js/* packages for visibility only—no library source or public API changes.

Reviewed by Cursor Bugbot for commit 7b6a0d0. Bugbot is set up for automated code reviews on this repo. Configure here.

@alexander-sei
alexander-sei requested a review from masih July 20, 2026 14:37
@codecov-commenter

codecov-commenter commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.75%. Comparing base (bc17ace) to head (7b6a0d0).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #316   +/-   ##
=======================================
  Coverage   79.75%   79.75%           
=======================================
  Files          83       83           
  Lines        1309     1309           
  Branches      160      160           
=======================================
  Hits         1044     1044           
  Misses        265      265           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Add a patch changeset across all six published packages and record the
fix in the root CHANGELOG (2.0.0 -> 2.0.1) so the AsyncAPI supply-chain
hardening ships as a coordinated release via the changesets flow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@alexander-sei
alexander-sei merged commit 2666156 into main Jul 22, 2026
3 checks passed
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.

3 participants