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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ 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.78](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.78) - 2026-04-01

### Fixed
- `socket scan create`, `socket scan reach`, and `socket fix` now respect `projectIgnorePaths` from `socket.yml` when collecting files

## [1.1.77](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.77) - 2026-04-01

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "socket",
"version": "1.1.77",
"version": "1.1.78",
"description": "CLI for Socket.dev",
"homepage": "https://github.com/SocketDev/socket-cli",
"license": "MIT AND OFL-1.1",
Expand Down
9 changes: 9 additions & 0 deletions src/commands/fix/coana-fix.mts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
fetchGhsaDetails,
setGitRemoteGithubRepoUrl,
} from '../../utils/github.mts'
import { findSocketYmlSync } from '../../utils/config.mts'

Check warning on line 47 in src/commands/fix/coana-fix.mts

View workflow job for this annotation

GitHub Actions / lint

`../../utils/config.mts` import should occur before import of `../../utils/dlx.mts`
import { getPackageFilesForScan } from '../../utils/path-resolve.mts'
import { setupSdk } from '../../utils/sdk.mts'
import { fetchSupportedScanFileNames } from '../scan/fetch-supported-scan-file-names.mts'
Expand Down Expand Up @@ -157,7 +158,15 @@
}

const supportedFiles = supportedFilesCResult.data

// Load socket.yml to respect projectIgnorePaths when collecting files.
const socketYmlResult = findSocketYmlSync(cwd)
const socketConfig = socketYmlResult.ok
? socketYmlResult.data?.parsed
: undefined

const scanFilepaths = await getPackageFilesForScan(['.'], supportedFiles, {
config: socketConfig,
cwd,
})
// Exclude any .socket.facts.json files that happen to be in the scan
Expand Down
1 change: 0 additions & 1 deletion src/commands/scan/cmd-scan-create.mts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ async function run(
...generalFlags,
...reachabilityFlags,
},
// TODO: Your project's "socket.yml" file's "projectIgnorePaths".
help: command => `
Usage
$ ${command} [options] [TARGET...]
Expand Down
9 changes: 9 additions & 0 deletions src/commands/scan/handle-create-new-scan.mts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { outputCreateNewScan } from './output-create-new-scan.mts'
import { performReachabilityAnalysis } from './perform-reachability-analysis.mts'
import constants from '../../constants.mts'
import { checkCommandInput } from '../../utils/check-input.mts'
import { findSocketYmlSync } from '../../utils/config.mts'
import { getPackageFilesForScan } from '../../utils/path-resolve.mts'
import { readOrDefaultSocketJson } from '../../utils/socket-json.mts'
import { socketDocsLink } from '../../utils/terminal-link.mts'
Expand Down Expand Up @@ -164,7 +165,15 @@ export async function handleCreateNewScan({
spinner.start('Searching for local files to include in scan...')

const supportedFiles = supportedFilesCResult.data

// Load socket.yml to respect projectIgnorePaths when collecting files.
const socketYmlResult = findSocketYmlSync(cwd)
const socketConfig = socketYmlResult.ok
? socketYmlResult.data?.parsed
: undefined

const packagePaths = await getPackageFilesForScan(targets, supportedFiles, {
config: socketConfig,
cwd,
})

Expand Down
9 changes: 9 additions & 0 deletions src/commands/scan/handle-scan-reach.mts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { outputScanReach } from './output-scan-reach.mts'
import { performReachabilityAnalysis } from './perform-reachability-analysis.mts'
import constants from '../../constants.mts'
import { checkCommandInput } from '../../utils/check-input.mts'
import { findSocketYmlSync } from '../../utils/config.mts'
import { getPackageFilesForScan } from '../../utils/path-resolve.mts'

import type { ReachabilityOptions } from './perform-reachability-analysis.mts'
Expand Down Expand Up @@ -47,7 +48,15 @@ export async function handleScanReach({
)

const supportedFiles = supportedFilesCResult.data

// Load socket.yml to respect projectIgnorePaths when collecting files.
const socketYmlResult = findSocketYmlSync(cwd)
const socketConfig = socketYmlResult.ok
? socketYmlResult.data?.parsed
: undefined

const packagePaths = await getPackageFilesForScan(targets, supportedFiles, {
config: socketConfig,
cwd,
})

Expand Down
Loading