You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All commands support `--json` for structured JSON output and `--cwd <dir>` to set the working directory (default: `.`). Every JSON response includes a `"status"` field (`"success"`, `"error"`, `"no_manifest"`, etc.) for reliable programmatic consumption.
78
+
77
79
### `get`
78
80
79
81
Get security patches from Socket API and apply them. Accepts a UUID, CVE ID, GHSA ID, PURL, or package name. The identifier type is auto-detected but can be forced with a flag.
@@ -94,10 +96,11 @@ socket-patch get <identifier> [options]
94
96
|`--ghsa`| Force identifier to be treated as a GHSA ID |
95
97
|`-p, --package`| Force identifier to be treated as a package name |
96
98
|`-y, --yes`| Skip confirmation prompt for multiple patches |
97
-
|`--no-apply`| Download patch without applying it |
99
+
|`--save-only`| Download patch without applying it (alias: `--no-apply`)|
98
100
|`--one-off`| Apply patch immediately without saving to `.socket` folder |
99
101
|`-g, --global`| Apply to globally installed packages |
100
102
|`--global-prefix <path>`| Custom path to global `node_modules`|
103
+
|`--json`| Output results as JSON |
101
104
|`--api-token <token>`| Socket API token (overrides `SOCKET_API_TOKEN`) |
102
105
|`--api-url <url>`| Socket API URL (overrides `SOCKET_API_URL`) |
103
106
|`--cwd <dir>`| Working directory (default: `.`) |
@@ -117,10 +120,13 @@ socket-patch get GHSA-xxxx-yyyy-zzzz
117
120
socket-patch get lodash
118
121
119
122
# Download only, don't apply
120
-
socket-patch get CVE-2024-12345 --no-apply
123
+
socket-patch get CVE-2024-12345 --save-only
121
124
122
125
# Apply to global packages
123
126
socket-patch get lodash -g
127
+
128
+
# JSON output for scripting
129
+
socket-patch get CVE-2024-12345 --json -y
124
130
```
125
131
126
132
### `scan`
@@ -137,6 +143,7 @@ socket-patch scan [options]
137
143
|------|-------------|
138
144
|`--org <slug>`| Organization slug |
139
145
|`--json`| Output results as JSON |
146
+
|`--ecosystems <list>`| Restrict to specific ecosystems (comma-separated: `npm,pypi,cargo`) |
# "success", "partial_failure", "no_manifest", or "error"
366
413
```
367
414
415
+
When stdin is not a TTY (e.g., in CI pipelines), interactive prompts auto-proceed instead of blocking. Progress indicators and ANSI colors are automatically suppressed when output is piped.
0 commit comments