Skip to content

chore: scope sample package name to prevent dependency confusion (H1 #2997377) - #18

Open
sebastian8x8 wants to merge 1 commit into
8x8:mainfrom
sebastian8x8:chore/scope-jaas-jwt-package-name
Open

chore: scope sample package name to prevent dependency confusion (H1 #2997377)#18
sebastian8x8 wants to merge 1 commit into
8x8:mainfrom
sebastian8x8:chore/scope-jaas-jwt-package-name

Conversation

@sebastian8x8

@sebastian8x8 sebastian8x8 commented May 7, 2026

Copy link
Copy Markdown

Summary

Renames this sample's package.json name: field from the unscoped jaas-jwt to the scoped @8x8/jaas-jwt-sample, and adds "private": true. Single-file change in jaas-jwt-samples/js/package.json; no behavioural impact on the sample itself.

Why

The public npm package jaas-jwt was claimed by an external party in February 2025 — see HackerOne report #2997377 by @MuhammadWaseem3. While the report was closed Informative (the sample is not consumed as a dependency by other 8x8 projects), the manifest's bare name: field is still a dependency-confusion vector:

  • A developer who clones this sample and runs npm install jaas-jwt (or copies the sample wholesale into a project) resolves the public attacker-controlled package, not this directory's local code.
  • The H1 reporter's npm publication received DNS / HTTP callbacks from real consumers within minutes, demonstrating live impact.

8x8/Jitsi already owns the @8x8 scope on npm, which structurally prevents drive-by registration of @8x8/anything. Scoping the sample under @8x8 makes the bare-name vector a no-op.

What changed

jaas-jwt-samples/js/package.json:

  • "name": "jaas-jwt""name": "@8x8/jaas-jwt-sample"
  • Added "private": true (belt-and-braces — blocks accidental npm publish from the sample dir; doesn't change attack surface but signals intent)

Test plan

  • Confirm node src/index.js still runs from jaas-jwt-samples/js/ after npm install
  • Verified no other 8x8/Jitsi repo references jaas-jwt as a dependency (zero internal consumers per SOCmate SBOM, 2026-05-07)

References

Follow-up

The squatted public jaas-jwt package is still live on npm. Recommend filing a takedown via security@npmjs.com citing H1 #2997377 + this PR.

🤖 Generated with Claude Code

…#2997377)

The unscoped 'jaas-jwt' name in this sample's package.json is a
dependency-confusion vector — the public 'jaas-jwt' package on npm
was claimed by an external party in February 2025 (HackerOne report
#2997377). A developer who copies this sample and runs 'npm install
jaas-jwt' resolves the public attacker-controlled package, not this
directory's local code.

Renames the sample to '@8x8/jaas-jwt-sample' (under the @8x8 npm
scope, which 8x8/Jitsi owns and is structurally protected against
drive-by registration) and adds 'private': true to block accidental
publish from this directory.

Surfaced by SOCmate's manifest_name_leak detector. No behavioural
change to the sample itself; no consumers in the 8x8/Jitsi SBOM.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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