Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.

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

## [1.1.17](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.16) - 2025-09-18

### Changed
- Rename `--only-compute` flag to `--dont-apply-fixejs` for `socket fix`, but keep old flag as an alias.

### Fixed
- Sanitize extracted git repository names to be compatible with the Socket API.

## [1.1.16](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.16) - 2025-09-16

### Fixed
Expand Down
3 changes: 2 additions & 1 deletion src/commands/fix/cmd-fix.mts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ Available styles:
* preserve - Retain the existing version range style as-is
`.trim(),
},
onlyCompute: {
dontApplyFixes: {
aliases: ['onlyCompute'],
type: 'boolean',
default: false,
description:
Expand Down
2 changes: 1 addition & 1 deletion src/commands/fix/cmd-fix.test.mts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ describe('socket fix', async () => {
Options
--autopilot Enable auto-merge for pull requests that Socket opens.
See GitHub documentation (https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository) for managing auto-merge for pull requests in your repository.
--dont-apply-fixes Compute fixes only, do not apply them. Logs what upgrades would be applied. If combined with --output-file, the output file will contain the upgrades that would be applied.
--id Provide a list of vulnerability identifiers to compute fixes for:
- GHSA IDs (https://docs.github.com/en/code-security/security-advisories/working-with-global-security-advisories-from-the-github-advisory-database/about-the-github-advisory-database#about-ghsa-ids) (e.g., GHSA-xxxx-xxxx-xxxx)
- CVE IDs (https://cve.mitre.org/cve/identifiers/) (e.g., CVE-2025-1234) - automatically converted to GHSA
Expand All @@ -165,7 +166,6 @@ describe('socket fix', async () => {
--json Output result as json
--limit The number of fixes to attempt at a time (default 10)
--markdown Output result as markdown
--only-compute Compute fixes only, do not apply them. Logs what upgrades would be applied. If combined with --output-file, the output file will contain the upgrades that would be applied.
--output-file Path to store upgrades as a JSON file at this path.
--range-style Define how dependency version ranges are updated in package.json (default 'preserve').
Available styles:
Expand Down
3 changes: 2 additions & 1 deletion src/commands/npm/socket-npm-integration.test.mts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ for (const npmDir of [] as string[]) {
'Expected Socket to detect typosquat, but command succeeded',
)
} catch (e) {
const errorMessage = (e as SpawnError)?.['stderr'] || (e as Error)?.['message'] || ''
const errorMessage =
(e as SpawnError)?.['stderr'] || (e as Error)?.['message'] || ''

// Success cases: Socket detected an issue.
Copy link
Contributor

Choose a reason for hiding this comment

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

The if statement on line 112 is missing curly braces. According to the control structures rule, all control structures must use curly braces even for single statements. The code should be: if (errorMessage.includes('typosquat')) { continue }

Spotted by Diamond (based on custom rule: Custom rules)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

if (
Expand Down
Loading
Loading