-
Notifications
You must be signed in to change notification settings - Fork 35
feat: migrate patch command to @socketsecurity/socket-patch@1.2.0 #1042
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment @cursor review or bugbot run to trigger another review on this PR
|
|
||
| if (!result.ok) { | ||
| process.exitCode = 1 | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error messages silently discarded on spawn failure
Medium Severity
When spawnSocketPatch fails (e.g., network error downloading the package, invalid local path, permission issues), the error message is captured in result.message but never displayed to the user. The code only sets process.exitCode = 1 without outputting the error. Other commands in the codebase properly handle this by calling logger.fail() with the message. Users will experience silent failures with exit code 1 but no explanation of what went wrong.
ba8a337 to
aee59b7
Compare
453e76a to
174fe73
Compare
174fe73 to
92f1cca
Compare
- Replace 'info' test (removed command) with 'scan' (renamed from discover) - Replace 'discover' test with 'scan' (renamed) - Replace 'download' test with 'get' (download is alias) - Replace 'cleanup' test with 'repair' (renamed) - Replace 'rm' test with 'remove' (renamed) These changes align tests with socket-patch v1.2.0 command structure.
…te limiting" This reverts commit 92f1cca.
…ate limiting" This reverts commit 7fb6023.
Resolved conflict in CHANGELOG.md by keeping all changes: - Changed: Updated to @socketsecurity/socket-patch@1.2.0 - Changed: Updated Coana CLI to v14.12.148 - Fixed: Heap overflow prevention in large monorepo scans
Version getters should fail if environment variables aren't set, even in test mode, because values should be properly defined in external-tools.json.
Removed tests for commands not in socket-patch v1.2.0: - cleanup (obsolete, repair is the actual command) - discover (obsolete, scan is the actual command) - info (obsolete, merged into get command) - download (obsolete, alias of get command) Renamed: - cmd-patch-rm.test.mts → cmd-patch-remove.test.mts socket-patch v1.2.0 actual commands: get, apply, rollback, remove, list, scan, setup, repair
Added INLINED_SOCKET_CLI_COANA_VERSION, INLINED_SOCKET_CLI_SFW_VERSION, and INLINED_SOCKET_CLI_SOCKET_PATCH_VERSION to .env.test so unit tests can access these values without going through the build process.
0d338b4 to
85db681
Compare
Migrate patch command to use external socket-patch@1.2.0 package.
Note
Shifts patch functionality to the external Socket Patch CLI and wires up version/env plumbing.
socket patchnow forwards all args to@socketsecurity/socket-patch@1.2.0viaspawnSocketPatch(DLX or local override)socket-patchtoexternal-tools.jsonand inlined build metadataINLINED_SOCKET_CLI_SOCKET_PATCH_VERSIONgetSocketPatchVersion,SOCKET_CLI_SOCKET_PATCH_LOCAL_PATH; exports integrated inconstants/env.mtsutils/socket-patch/spawn.mtspasses org slug, API token, and proxy to the external CLIcommands/patch-old/*for reference/compatibilityWritten by Cursor Bugbot for commit 69011b8. Configure here.