Skip to content

Commit 9c21ec1

Browse files
committed
feat: update @socketsecurity/socket-patch to v2.0.0
- Upgrade socket-patch from v1.2.0 to v2.0.0, now a native Rust binary - Rewrite patch command to spawn the platform-specific Rust binary directly instead of importing the Node.js runPatch() function - Map socket-cli environment variables to socket-patch env vars (SOCKET_API_URL, SOCKET_API_TOKEN, SOCKET_ORG_SLUG, etc.) - Add comprehensive patch command documentation to README with subcommand reference table and quick-start guide - Bump version to 1.1.58
1 parent bb40338 commit 9c21ec1

File tree

5 files changed

+237
-25
lines changed

5 files changed

+237
-25
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66

7+
## [1.1.67](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.67) - 2026-03-06
8+
9+
### Changed
10+
- Updated `@socketsecurity/socket-patch` to v2.0.0, now powered by a native Rust binary for faster patch operations
11+
- The `socket patch` command now directly invokes the platform-specific Rust binary instead of a Node.js wrapper
12+
- Enhanced `socket patch` documentation with a complete subcommand reference and quick-start guide
13+
714
## [1.1.66](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.66) - 2026-03-02
815

916
### Changed
@@ -52,7 +59,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5259
- Deprecated `--reach-disable-analysis-splitting` flag (now a no-op for backwards compatibility).
5360
- Updated the Coana CLI to v `14.12.154`.
5461

55-
5662
## [1.1.57](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.57) - 2026-01-10
5763

5864
### Changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,38 @@ socket --help
2222

2323
- `socket cdxgen [command]` - Run [cdxgen](https://cyclonedx.github.io/cdxgen/#/?id=getting-started) for SBOM generation
2424

25+
- `socket patch <command>` - Apply, manage, and rollback Socket security patches for vulnerable dependencies
26+
27+
### Patch subcommands
28+
29+
| Command | Description |
30+
|---------|-------------|
31+
| `socket patch scan` | Scan installed packages for available security patches |
32+
| `socket patch get <uuid> --org <slug>` | Download a patch by UUID and store it locally |
33+
| `socket patch apply` | Apply downloaded patches to `node_modules` |
34+
| `socket patch rollback [purl\|uuid]` | Rollback patches and restore original files |
35+
| `socket patch list [--json]` | List all patches in the local manifest |
36+
| `socket patch remove <purl\|uuid>` | Remove a patch from the manifest (rolls back by default) |
37+
| `socket patch setup [--yes]` | Add `socket patch apply` to `postinstall` scripts |
38+
| `socket patch repair` | Download missing blobs and clean up unused blobs |
39+
40+
**Quick start:**
41+
42+
```bash
43+
# Scan for available patches, download, and apply.
44+
socket patch scan
45+
socket patch apply
46+
47+
# Or download a specific patch by UUID.
48+
socket patch get <uuid> --org <org-slug>
49+
socket patch apply
50+
51+
# Add to postinstall so patches reapply on npm install.
52+
socket patch setup --yes
53+
```
54+
55+
Free patches work without authentication. For paid patches, set `SOCKET_CLI_API_TOKEN` and `SOCKET_CLI_ORG_SLUG`.
56+
2557
## Aliases
2658

2759
All aliases support the flags and arguments of the commands they alias.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "socket",
3-
"version": "1.1.66",
3+
"version": "1.1.67",
44
"description": "CLI for Socket.dev",
55
"homepage": "https://github.com/SocketDev/socket-cli",
66
"license": "MIT AND OFL-1.1",
@@ -86,6 +86,9 @@
8686
"update:deps": "taze",
8787
"update:socket": "pnpm update '@socketsecurity/*' '@socketregistry/*' --latest"
8888
},
89+
"dependencies": {
90+
"@socketsecurity/socket-patch": "2.0.0"
91+
},
8992
"devDependencies": {
9093
"@babel/core": "7.28.4",
9194
"@babel/plugin-proposal-export-default-from": "7.27.1",
@@ -123,7 +126,6 @@
123126
"@socketsecurity/config": "3.0.1",
124127
"@socketsecurity/registry": "1.1.17",
125128
"@socketsecurity/sdk": "1.4.96",
126-
"@socketsecurity/socket-patch": "1.2.0",
127129
"@types/blessed": "0.1.25",
128130
"@types/cmd-shim": "5.0.2",
129131
"@types/js-yaml": "4.0.9",

0 commit comments

Comments
 (0)