Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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.47](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.47) - 2025-12-15

### Added
- Added `--debug` flag to `socket fix` to enable verbose logging in the Coana CLI.

### Changed
- Updated the Coana CLI to v `14.12.127`.

## [1.1.46](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.46) - 2025-12-12

### Changed
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "socket",
"version": "1.1.46",
"version": "1.1.47",
"description": "CLI for Socket.dev",
"homepage": "https://github.com/SocketDev/socket-cli",
"license": "MIT AND OFL-1.1",
Expand Down Expand Up @@ -94,7 +94,7 @@
"@babel/preset-typescript": "7.27.1",
"@babel/runtime": "7.28.4",
"@biomejs/biome": "2.2.4",
"@coana-tech/cli": "14.12.126",
"@coana-tech/cli": "14.12.127",
"@cyclonedx/cdxgen": "11.11.0",
"@dotenvx/dotenvx": "1.49.0",
"@eslint/compat": "1.3.2",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/commands/fix/cmd-fix.integration.test.mts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { existsSync, promises as fs } from 'node:fs'
import { promises as fs } from 'node:fs'
import { tmpdir } from 'node:os'
import path from 'node:path'

import trash from 'trash'
import { describe, expect } from 'vitest'

import constants, {
Expand Down Expand Up @@ -167,6 +166,7 @@ describe('socket fix', async () => {
--all Process all discovered vulnerabilities in local mode. Cannot be used with --id.
--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.
--debug Enable debug logging in the Coana-based Socket Fix CLI invocation.
--ecosystems Limit fix analysis to specific ecosystems. Can be provided as comma separated values or as multiple flags. Defaults to all ecosystems.
--exclude Exclude workspaces matching these glob patterns. Can be provided as comma separated values or as multiple flags
--fix-version Override the version of @coana-tech/cli used for fix analysis. Default: <coana-version>.
Expand Down
10 changes: 10 additions & 0 deletions src/commands/fix/cmd-fix.mts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,13 @@ Available styles:
description:
'Set a minimum age requirement for suggested upgrade versions (e.g., 1h, 2d, 3w). A higher age requirement reduces the risk of upgrading to malicious versions. For example, setting the value to 1 week (1w) gives ecosystem maintainers one week to remove potentially malicious versions.',
},
debug: {
type: 'boolean',
default: false,
description:
'Enable debug logging in the Coana-based Socket Fix CLI invocation.',
shortFlag: 'd',
},
ecosystems: {
type: 'string',
default: [],
Expand Down Expand Up @@ -281,6 +288,7 @@ async function run(
all,
applyFixes,
autopilot,
debug,
ecosystems,
exclude,
fixVersion,
Expand All @@ -302,6 +310,7 @@ async function run(
all: boolean
applyFixes: boolean
autopilot: boolean
debug: boolean
ecosystems: string[]
exclude: string[]
fixVersion: string | undefined
Expand Down Expand Up @@ -409,6 +418,7 @@ async function run(
autopilot,
coanaVersion: fixVersion,
cwd,
debug,
disableMajorUpdates,
ecosystems: validatedEcosystems,
exclude: excludePatterns,
Expand Down
3 changes: 3 additions & 0 deletions src/commands/fix/coana-fix.mts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export async function coanaFix(
autopilot,
coanaVersion,
cwd,
debug,
disableMajorUpdates,
ecosystems,
exclude,
Expand Down Expand Up @@ -246,6 +247,7 @@ export async function coanaFix(
...(!applyFixes ? [FLAG_DRY_RUN] : []),
'--output-file',
tmpFile,
...(debug ? ['--debug'] : []),
...(disableMajorUpdates ? ['--disable-major-updates'] : []),
...(showAffectedDirectDependencies
? ['--show-affected-direct-dependencies']
Expand Down Expand Up @@ -371,6 +373,7 @@ export async function coanaFix(
...(include.length ? ['--include', ...include] : []),
...(exclude.length ? ['--exclude', ...exclude] : []),
...(ecosystems.length ? ['--purl-types', ...ecosystems] : []),
...(debug ? ['--debug'] : []),
...(disableMajorUpdates ? ['--disable-major-updates'] : []),
...(showAffectedDirectDependencies
? ['--show-affected-direct-dependencies']
Expand Down
3 changes: 3 additions & 0 deletions src/commands/fix/handle-fix.mts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export async function handleFix({
autopilot,
coanaVersion,
cwd,
debug,
disableMajorUpdates,
ecosystems,
exclude,
Expand All @@ -126,6 +127,7 @@ export async function handleFix({
autopilot,
coanaVersion,
cwd,
debug,
disableMajorUpdates,
ecosystems,
exclude,
Expand All @@ -149,6 +151,7 @@ export async function handleFix({
autopilot,
coanaVersion,
cwd,
debug,
disableMajorUpdates,
ecosystems,
exclude,
Expand Down
1 change: 1 addition & 0 deletions src/commands/fix/types.mts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type FixConfig = {
autopilot: boolean
coanaVersion: string | undefined
cwd: string
debug: boolean
disableMajorUpdates: boolean
ecosystems: PURL_Type[]
exclude: string[]
Expand Down