chore(test): mark js-scripts package as private#1035
Closed
dgilmanuni wants to merge 1 commit into
Closed
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
test/js-scripts/package.json(v4-js-scripts)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