Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update repository to match module template (February 2024) #133

Merged
merged 6 commits into from
Feb 21, 2024

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Feb 21, 2024

This updates the repository to match the modulate template as of February 2024. This includes:

  • Changing the build system to tsup, which adds a ESM version.
  • Better linting with constraints.
  • Updated CI to only run on the necessary Node.js versions.

I've also updated @metamask/utils to use the better ESM version. These changes will help Snaps to reduce the size.

@Mrtenz Mrtenz requested a review from a team as a code owner February 21, 2024 14:41
Copy link

socket-security bot commented Feb 21, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@cspotcode/source-map-support@0.8.1 filesystem +3 293 kB cspotcode
npm/@esbuild/android-arm@0.19.12 None 0 11.5 MB evanw
npm/@esbuild/android-arm64@0.19.12 None 0 9.83 MB evanw
npm/@esbuild/android-x64@0.19.12 None 0 11.5 MB evanw
npm/@esbuild/darwin-arm64@0.19.12 None 0 9.76 MB evanw
npm/@esbuild/darwin-x64@0.19.12 None 0 10.2 MB evanw
npm/@esbuild/freebsd-arm64@0.19.12 None 0 8.85 MB evanw
npm/@esbuild/freebsd-x64@0.19.12 None 0 9.61 MB evanw
npm/@esbuild/linux-arm@0.19.12 None 0 9.18 MB evanw
npm/@esbuild/linux-arm64@0.19.12 None 0 8.85 MB evanw
npm/@esbuild/linux-ia32@0.19.12 None 0 9.14 MB evanw
npm/@esbuild/linux-loong64@0.19.12 None 0 9.37 MB evanw
npm/@esbuild/linux-mips64el@0.19.12 None 0 10.4 MB evanw
npm/@esbuild/linux-ppc64@0.19.12 None 0 9.18 MB evanw
npm/@esbuild/linux-riscv64@0.19.12 None 0 9.11 MB evanw
npm/@esbuild/linux-s390x@0.19.12 None 0 10 MB evanw
npm/@esbuild/linux-x64@0.19.12 None 0 9.6 MB evanw
npm/@esbuild/netbsd-x64@0.19.12 None 0 9.59 MB evanw
npm/@esbuild/openbsd-x64@0.19.12 None 0 9.62 MB evanw
npm/@esbuild/sunos-x64@0.19.12 None 0 9.59 MB evanw
npm/@esbuild/win32-arm64@0.19.12 None 0 8.98 MB evanw
npm/@esbuild/win32-ia32@0.19.12 None 0 9.45 MB evanw
npm/@esbuild/win32-x64@0.19.12 None 0 9.81 MB evanw
npm/@lavamoat/aa@4.0.1 filesystem Transitive: environment +6 249 kB naugtur
npm/@lavamoat/allow-scripts@3.0.2 environment, filesystem, shell Transitive: network +124 8.06 MB boneskull
npm/@lavamoat/preinstall-always-fail@2.0.0 None 0 3.25 kB naugtur
npm/@npmcli/agent@2.2.1 environment, network +11 1.15 MB npm-cli-ops
npm/@npmcli/fs@3.1.0 filesystem +2 136 kB lukekarrys
npm/@npmcli/git@5.0.4 filesystem Transitive: environment, shell +18 804 kB npm-cli-ops
npm/@npmcli/package-json@5.0.0 filesystem Transitive: environment, shell +56 3.43 MB npm-cli-ops
npm/@npmcli/promise-spawn@7.0.1 environment, shell Transitive: filesystem +2 62.5 kB npm-cli-ops
npm/@npmcli/run-script@7.0.4 environment Transitive: filesystem, network, shell +106 7.21 MB npm-cli-ops
npm/@tsconfig/node10@1.0.9 None 0 2.39 kB typescript-deploys
npm/@tsconfig/node12@1.0.11 None 0 2.5 kB typescript-deploys
npm/@tsconfig/node14@1.0.3 None 0 2.39 kB typescript-deploys
npm/@tsconfig/node16@1.0.4 None 0 2.45 kB typescript-deploys
npm/abbrev@2.0.0 None 0 4.83 kB lukekarrys
npm/acorn-walk@8.3.2 None 0 52.4 kB marijn
npm/agent-base@7.1.0 network +1 30.3 kB tootallnate
npm/agentkeepalive@4.2.1 network Transitive: environment, eval +3 79.8 kB fengmk2
npm/any-promise@1.3.0 None 0 22.2 kB kevinbeaty
npm/arg@4.1.3 None 0 12.9 kB qix
npm/bin-links@4.0.3 filesystem +6 142 kB npm-cli-ops
npm/binary-extensions@2.2.0 None 0 5.36 kB sindresorhus
npm/bundle-require@4.0.2 environment, filesystem, unsafe Transitive: network, shell +24 213 MB egoist
npm/cac@6.7.14 None 0 81.8 kB egoist
npm/cacache@18.0.2 filesystem Transitive: environment, shell +51 3.53 MB npm-cli-ops
npm/chokidar@3.6.0 environment, filesystem +13 519 kB paulmillr
npm/create-require@1.1.1 filesystem, unsafe 0 6.25 kB pi0
npm/esbuild@0.19.12 environment, filesystem, network, shell +22 213 MB evanw
npm/fs-minipass@3.0.3 filesystem +1 299 kB npm-cli-ops
npm/glob@10.3.10 Transitive: environment, filesystem, shell +27 2.86 MB isaacs
npm/hosted-git-info@7.0.1 None +1 485 kB npm-cli-ops
npm/http-proxy-agent@7.0.2 network +2 53.7 kB tootallnate
npm/https-proxy-agent@7.0.4 network +2 65.6 kB tootallnate
npm/is-binary-path@2.1.0 None +1 8.43 kB sindresorhus
npm/jackspeak@2.3.6 environment +13 574 kB isaacs
npm/joycon@3.1.1 environment, filesystem 0 14 kB egoist
npm/lilconfig@3.1.1 filesystem 0 17.7 kB antonk52
npm/load-tsconfig@0.2.5 None 0 17.1 kB egoist
npm/lodash.sortby@4.7.0 None 0 75.8 kB jdalton
npm/make-fetch-happen@13.0.0 network Transitive: environment, filesystem, shell +74 4.97 MB npm-cli-ops
npm/minipass-collect@2.0.1 None +1 290 kB isaacs
npm/minipass-fetch@3.0.4 environment, network +6 871 kB npm-cli-ops
npm/mz@2.7.0 filesystem, network, shell +4 52 kB jongleberry
npm/node-gyp@10.0.1 environment, shell Transitive: filesystem, network +83 6.85 MB lukekarrys
npm/nopt@7.2.0 None +1 31 kB npm-cli-ops
npm/normalize-package-data@6.0.0 None +12 763 kB npm-cli-ops
npm/npm-install-checks@6.3.0 None +2 116 kB npm-cli-ops
npm/npm-package-arg@11.0.1 None +7 630 kB npm-cli-ops
npm/npm-pick-manifest@9.0.0 None +10 657 kB npm-cli-ops
npm/object-assign@4.1.1 None 0 5.49 kB sindresorhus
npm/postcss-load-config@4.0.2 environment, unsafe Transitive: filesystem +25 73.5 MB ai
npm/proc-log@3.0.0 None 0 5.21 kB lukekarrys
npm/rollup@4.12.0 environment, filesystem +1 2.43 MB lukastaegert
npm/socks-proxy-agent@8.0.2 network +7 612 kB tootallnate
npm/spdx-correct@3.2.0 None +3 51.4 kB kemitchell
npm/ssri@10.0.5 None +1 323 kB npm-cli-ops
npm/sucrase@3.35.0 Transitive: environment, filesystem, network, shell, unsafe +42 4.59 MB alangpierce
npm/thenify-all@1.6.0 None +2 36.7 kB dead_horse
npm/thenify@3.3.1 None +1 30.1 kB dead_horse
npm/tr46@1.0.1 None +1 356 kB sebmaster
npm/tree-kill@1.2.2 shell 0 7.82 kB wmhilton
npm/ts-interface-checker@0.1.13 None 0 68 kB dsagal2
npm/ts-node@10.9.2 environment, filesystem, unsafe +18 72.4 MB blakeembrey
npm/tsup@7.3.0 environment, eval, filesystem Transitive: network, shell, unsafe +144 296 MB egoist
npm/unique-filename@3.0.0 None +2 17.9 kB lukekarrys
npm/unique-slug@4.0.0 None +1 14.5 kB lukekarrys
npm/v8-compile-cache-lib@3.0.1 environment, filesystem, unsafe 0 18.2 kB cspotcode
npm/validate-npm-package-license@3.0.4 None +4 68 kB kemitchell
npm/validate-npm-package-name@5.0.0 None +3 122 kB lukekarrys
npm/webidl-conversions@4.0.2 None 0 19.3 kB domenic
npm/whatwg-url@7.1.0 None +4 529 kB domenic
npm/which@4.0.0 environment Transitive: filesystem +1 50.5 kB npm-cli-ops
npm/yn@3.1.1 None 0 6.31 kB sindresorhus

🚮 Removed packages: npm/@lavamoat/aa@3.1.5, npm/@lavamoat/allow-scripts@2.5.1, npm/@lavamoat/preinstall-always-fail@1.0.3, npm/@npmcli/fs@2.1.2, npm/@npmcli/promise-spawn@6.0.2, npm/@npmcli/run-script@6.0.2, npm/abbrev@1.1.1, npm/agent-base@6.0.2, npm/agentkeepalive@4.5.0, npm/bin-links@4.0.1, npm/cacache@16.1.3, npm/http-proxy-agent@5.0.0, npm/https-proxy-agent@5.0.1, npm/ip@2.0.1, npm/jackspeak@2.3.1, npm/make-fetch-happen@10.2.1, npm/minipass-collect@1.0.2, npm/minipass-fetch@2.1.2, npm/node-gyp@9.4.1, npm/nopt@6.0.0, npm/read-package-json-fast@3.0.2, npm/socks-proxy-agent@7.0.0, npm/ssri@9.0.1, npm/unique-filename@2.0.1, npm/unique-slug@3.0.0, npm/which@3.0.1

View full report↗︎

Copy link

socket-security bot commented Feb 21, 2024

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSource
Network access npm/agent-base@7.1.0
Network access npm/agent-base@7.1.0
Shell access npm/mz@2.7.0
Network access npm/mz@2.7.0
New author npm/validate-npm-package-name@5.0.0
Shell access npm/tree-kill@1.2.2
New author npm/nopt@7.2.0
New author npm/abbrev@2.0.0
New author npm/source-map@0.8.0-beta.0
New author npm/normalize-package-data@6.0.0
Network access npm/socks-proxy-agent@8.0.2
Deprecated npm/tsup@7.3.0
  • Reason: Breaking node 16
Install scripts npm/esbuild@0.19.12
Shell access npm/esbuild@0.19.12
Network access npm/esbuild@0.19.12
Network access npm/esbuild@0.19.12
Network access npm/@npmcli/agent@2.2.1
Network access npm/@npmcli/agent@2.2.1
Network access npm/@npmcli/agent@2.2.1
Network access npm/@npmcli/agent@2.2.1
Network access npm/@npmcli/agent@2.2.1

View full report↗︎

Next steps

What is network access?

This module accesses the network.

Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use.

What is shell access?

This module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.

Packages should avoid accessing the shell which can reduce portability, and make it easier for malicious shell access to be introduced.

What is new author?

A new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.

Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights.

What is a deprecated package?

The maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.

Research the state of the package and determine if there are non-deprecated versions that can be used, or if it should be replaced with a new, supported solution.

What is an install script?

Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.

Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/agent-base@7.1.0
  • @SocketSecurity ignore npm/mz@2.7.0
  • @SocketSecurity ignore npm/validate-npm-package-name@5.0.0
  • @SocketSecurity ignore npm/tree-kill@1.2.2
  • @SocketSecurity ignore npm/nopt@7.2.0
  • @SocketSecurity ignore npm/abbrev@2.0.0
  • @SocketSecurity ignore npm/source-map@0.8.0-beta.0
  • @SocketSecurity ignore npm/normalize-package-data@6.0.0
  • @SocketSecurity ignore npm/socks-proxy-agent@8.0.2
  • @SocketSecurity ignore npm/tsup@7.3.0
  • @SocketSecurity ignore npm/esbuild@0.19.12
  • @SocketSecurity ignore npm/@npmcli/agent@2.2.1

Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looks good!

@Mrtenz Mrtenz merged commit 9fcba7a into main Feb 21, 2024
15 of 16 checks passed
@Mrtenz Mrtenz deleted the mrtenz/standardise-february-2024 branch February 21, 2024 18:52
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.

2 participants