diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f01df407..01062f9f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ 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.53](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.53) - 2026-01-06 + +### Changed +- The `scan_type` query argument is now set to `'socket_tier1'` when running `socket scan create --reach`. +This change ensures Tier 1 alerts from scans are ingested into the organization-level alerts correctly. + ## [1.1.52](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.52) - 2026-01-02 ### Added diff --git a/package.json b/package.json index 7180937f8..a16d58d44 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "socket", - "version": "1.1.52", + "version": "1.1.53", "description": "CLI for Socket.dev", "homepage": "https://github.com/SocketDev/socket-cli", "license": "MIT AND OFL-1.1", diff --git a/src/commands/scan/fetch-create-org-full-scan.mts b/src/commands/scan/fetch-create-org-full-scan.mts index 2383cdf10..bb04bdafe 100644 --- a/src/commands/scan/fetch-create-org-full-scan.mts +++ b/src/commands/scan/fetch-create-org-full-scan.mts @@ -18,6 +18,7 @@ export type FetchCreateOrgFullScanConfigs = { committers: string pullRequest: number repoName: string + scanType: string | undefined } export type FetchCreateOrgFullScanOptions = { @@ -41,6 +42,7 @@ export async function fetchCreateOrgFullScan( committers, pullRequest, repoName, + scanType, } = { __proto__: null, ...config } as FetchCreateOrgFullScanConfigs const { @@ -78,6 +80,7 @@ export async function fetchCreateOrgFullScan( ...(committers ? { committers } : {}), make_default_branch: String(defaultBranch), ...(pullRequest ? { pull_request: String(pullRequest) } : {}), + scan_type: scanType, repo: repoName, set_as_pending_head: String(pendingHead), tmp: String(tmp), diff --git a/src/commands/scan/handle-create-new-scan.mts b/src/commands/scan/handle-create-new-scan.mts index 2e023e10e..ae932653b 100644 --- a/src/commands/scan/handle-create-new-scan.mts +++ b/src/commands/scan/handle-create-new-scan.mts @@ -254,6 +254,9 @@ export async function handleCreateNewScan({ pullRequest, repoName, branchName, + scanType: reach.runReachabilityAnalysis + ? constants.SCAN_TYPE_SOCKET_TIER1 + : constants.SCAN_TYPE_SOCKET, }, { cwd, diff --git a/src/constants.mts b/src/constants.mts index a44962257..fc88b1cf2 100644 --- a/src/constants.mts +++ b/src/constants.mts @@ -263,6 +263,8 @@ const SOCKET_CLI_SHADOW_BIN = 'SOCKET_CLI_SHADOW_BIN' const SOCKET_CLI_SHADOW_PROGRESS = 'SOCKET_CLI_SHADOW_PROGRESS' const SOCKET_CLI_SHADOW_SILENT = 'SOCKET_CLI_SHADOW_SILENT' const SOCKET_CLI_VIEW_ALL_RISKS = 'SOCKET_CLI_VIEW_ALL_RISKS' +const SCAN_TYPE_SOCKET = 'socket' +const SCAN_TYPE_SOCKET_TIER1 = 'socket_tier1' const SOCKET_DEFAULT_BRANCH = 'socket-default-branch' const SOCKET_DEFAULT_REPOSITORY = 'socket-default-repository' const SOCKET_JSON = 'socket.json' @@ -355,6 +357,8 @@ export type Constants = Remap< readonly REPORT_LEVEL_MONITOR: typeof REPORT_LEVEL_MONITOR readonly REPORT_LEVEL_WARN: typeof REPORT_LEVEL_WARN readonly REQUIREMENTS_TXT: typeof REQUIREMENTS_TXT + readonly SCAN_TYPE_SOCKET: typeof SCAN_TYPE_SOCKET + readonly SCAN_TYPE_SOCKET_TIER1: typeof SCAN_TYPE_SOCKET_TIER1 readonly SOCKET_CLI_ACCEPT_RISKS: typeof SOCKET_CLI_ACCEPT_RISKS readonly SOCKET_CLI_BIN_NAME: typeof SOCKET_CLI_BIN_NAME readonly SOCKET_CLI_ISSUES_URL: typeof SOCKET_CLI_ISSUES_URL @@ -941,6 +945,8 @@ const constants: Constants = createConstantsObject( REPORT_LEVEL_MONITOR, REPORT_LEVEL_WARN, REQUIREMENTS_TXT, + SCAN_TYPE_SOCKET, + SCAN_TYPE_SOCKET_TIER1, SOCKET_CLI_ACCEPT_RISKS, SOCKET_CLI_BIN_NAME, SOCKET_CLI_ISSUES_URL, @@ -1197,6 +1203,8 @@ export { REPORT_LEVEL_MONITOR, REPORT_LEVEL_WARN, REQUIREMENTS_TXT, + SCAN_TYPE_SOCKET, + SCAN_TYPE_SOCKET_TIER1, SOCKET_CLI_ACCEPT_RISKS, SOCKET_CLI_BIN_NAME, SOCKET_CLI_ISSUES_URL,