Install Socket tools
Official install commands, served from a domain Socket controls.
Socket Patch
socket-patch applies Socket's vulnerability patches to the dependencies already installed in your project.
curl -fsSL https://install.socket.dev/patch | sh
It detects your platform, downloads the matching binary from the latest
GitHub release, verifies it against the release's
SHA256SUMS before unpacking, and installs it to
/usr/local/bin — or ~/.local/bin when
/usr/local/bin is not writable.
Pin a version instead of taking the latest:
curl -fsSL https://install.socket.dev/patch | SOCKET_PATCH_VERSION=3.3.0
sh
Read it before you run it
Piping a script into a shell is worth a look first. The bytes served at install.socket.dev/patch are a copy of scripts/install.sh in the socket-patch repository — read either one, or check them against each other. The SHA-256 of what we publish here is at install.socket.dev/patch.sha256.
Package managers
If you would rather install socket-patch through the toolchain you already have, every one of these tracks the same releases:
| Tool | Command |
|---|---|
| npm | npm install -g @socketsecurity/socket-patch |
| pip | pip install socket-patch |
| cargo | cargo install socket-patch-cli |
| gem | gem install socket-patch |
| composer | composer require socketsecurity/socket-patch |
| dotnet |
dotnet tool install -g SocketSecurity.SocketPatch
|
Windows
The one-liner above is a POSIX shell script, so it needs WSL, Git Bash, or similar. On native Windows, use one of the package managers above, or download a release archive directly.