chore(repo): mark root package as private#163
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Closing after deeper analysis.
The class-closing fix is renaming to a controlled scope ( Reopening if we decide the cosmetic signaling value alone justifies the reviewer attention. |
Summary
Marks 1 internal
package.jsonfile(s) as"private": trueto close a dependency-confusion attack class.Background
Cantina finding #677 identified two internal package names in
interface(datadog-cloud-universe,datadog-dashboards-universe) that were unscoped and not marked"private": true, creating dependency-confusion exposure: if any tooling ever fell back from workspace resolution to the public npm registry for these names, an attacker who registered the name first would achieve arbitrary code execution in the install context (developer laptops or CI runners).A sweep across the rest of the Uniswap orgs' local-checkout repos found the same vulnerability shape in 1
package.jsonfile(s) here, plus dozens more acrossbackend,unichain, and others (separate PRs). Several internal Uniswap package names across the org are already registered to third-party accounts on public npm — includingai-agents,cloudflare,data-api,mission-control,notification-service,liquidity, andwebsockets— meaning the dependency-confusion target is currently live, not theoretical.What changed
package.json(the-compact)The fix is purely defensive:
npm/bunrefuse to publish a package markedprivate, and the resolver's behavior is unchanged for any consumer that already uses workspace or lockfile resolution. No behavior change is expected for builds, tests, deploys, or developer workflows.Test plan
"private": trueset on eachSession context
Uniswap/securitytagged so the security team can sign off on the closing of the class without surprise.apps/mobile/src/{"name":"src"}Metro module-resolution markers (not a dep-confusion vector — bundlers don't resolvesrcfrom npm), andcypress-hardhat(intentionally published underuniswap-labs-service-account).scripts/ecsServiceTemplate/T_SERVICE_NAME/infra/package.jsonis included in the backend PR so future generated services start private-by-default. Universe's Nx generator already does the right thing.package.jsonwould prevent regression entirely; tracked separately.🤖 Generated with Claude Code