Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
781478b
chore(ci): bump socket-registry refs to d54c36d0 + delegate weekly-up…
jdalton Apr 18, 2026
edbfbc6
chore: bump @socketsecurity/lib to 5.19.1
jdalton Apr 19, 2026
2474071
chore: bump @socketsecurity/lib to 5.19.1 in check-new-deps+setup-sec…
jdalton Apr 19, 2026
2822ff2
chore: register .claude/hooks/* as workspace packages
jdalton Apr 19, 2026
996a9c6
chore(deps): bump @socketsecurity/lib to 5.20.1 in catalog
jdalton Apr 20, 2026
a0418f7
chore(hooks): sync .claude/hooks packages to lib 5.20.1
jdalton Apr 20, 2026
3387322
chore(deps): bump @socketsecurity/lib to 5.21.0
jdalton Apr 20, 2026
65f0c72
chore(ipc): sort locally-defined Ipc interface properties alphabetically
jdalton Apr 20, 2026
9e60c03
refactor(spawn-node): use assertion function instead of structural cast
jdalton Apr 20, 2026
aac40c4
chore(ci): bump socket-registry refs to 3362af95
jdalton Apr 20, 2026
4c6376b
chore(ci): bump socket-registry workflow refs to 594526f
jdalton Apr 21, 2026
9bccd51
fix(ci): allow @pnpm/exe preinstall for pnpm rc.3 bootstrap
jdalton Apr 21, 2026
5258077
chore(ci): bump socket-registry refs to main (6e347cee)
jdalton Apr 21, 2026
2527df2
chore(ci): bump socket-registry refs to main (46132ceb)
jdalton Apr 21, 2026
0a0ecd6
chore(ci): bump socket-registry refs to main (a5923566)
jdalton Apr 21, 2026
d6b4574
Merge remote-tracking branch 'origin/chore/bump-registry-sha-rc3' int…
jdalton Apr 21, 2026
1584ea5
Merge remote-tracking branch 'origin/chore/bump-socket-registry-6e347…
jdalton Apr 21, 2026
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
6 changes: 3 additions & 3 deletions .claude/hooks/check-new-deps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"test": "node --test test/*.test.mts"
},
"dependencies": {
"@socketregistry/packageurl-js": "1.4.2",
"@socketsecurity/lib": "5.18.2",
"@socketsecurity/sdk": "4.0.1"
"@socketregistry/packageurl-js": "catalog:",
"@socketsecurity/lib": "catalog:",
"@socketsecurity/sdk": "catalog:"
},
"devDependencies": {
"@types/node": "24.9.2"
Expand Down
2 changes: 1 addition & 1 deletion .claude/hooks/setup-security-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"type": "module",
"main": "./index.mts",
"dependencies": {
"@socketsecurity/lib": "5.18.2"
"@socketsecurity/lib": "catalog:"
}
}
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
export default { text, view, renderToString, renderToStringWithWidth, printComponent, eprintComponent, getTerminalSize, TuiRenderer, init }
CODE

- uses: SocketDev/socket-registry/.github/actions/setup-and-install@bbe46386c0a2bc6baefd02916234956a38e622d5 # main
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@a5923566cd8bcf70aefa1eefacf21f96e328be45 # main
with:
checkout: 'false'

Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
export default { text, view, renderToString, renderToStringWithWidth, printComponent, eprintComponent, getTerminalSize, TuiRenderer, init }
CODE

- uses: SocketDev/socket-registry/.github/actions/setup-and-install@bbe46386c0a2bc6baefd02916234956a38e622d5 # main
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@a5923566cd8bcf70aefa1eefacf21f96e328be45 # main
with:
checkout: 'false'

Expand Down Expand Up @@ -234,7 +234,7 @@ jobs:
export default { text, view, renderToString, renderToStringWithWidth, printComponent, eprintComponent, getTerminalSize, TuiRenderer, init }
CODE

- uses: SocketDev/socket-registry/.github/actions/setup-and-install@bbe46386c0a2bc6baefd02916234956a38e622d5 # main
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@a5923566cd8bcf70aefa1eefacf21f96e328be45 # main
with:
checkout: 'false'
node-version: ${{ matrix.node-version }}
Expand Down Expand Up @@ -310,7 +310,7 @@ jobs:
export default { text, view, renderToString, renderToStringWithWidth, printComponent, eprintComponent, getTerminalSize, TuiRenderer, init }
CODE

- uses: SocketDev/socket-registry/.github/actions/setup-and-install@bbe46386c0a2bc6baefd02916234956a38e622d5 # main
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@a5923566cd8bcf70aefa1eefacf21f96e328be45 # main
with:
checkout: 'false'
node-version: ${{ matrix.node-version }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/provenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
with:
persist-credentials: false

- uses: SocketDev/socket-registry/.github/actions/setup-and-install@bbe46386c0a2bc6baefd02916234956a38e622d5 # main
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@a5923566cd8bcf70aefa1eefacf21f96e328be45 # main
with:
checkout: 'false'

Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
with:
persist-credentials: false

- uses: SocketDev/socket-registry/.github/actions/setup-and-install@bbe46386c0a2bc6baefd02916234956a38e622d5 # main
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@a5923566cd8bcf70aefa1eefacf21f96e328be45 # main
with:
checkout: 'false'
registry-url: 'https://registry.npmjs.org'
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
with:
persist-credentials: false

- uses: SocketDev/socket-registry/.github/actions/setup-and-install@bbe46386c0a2bc6baefd02916234956a38e622d5 # main
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@a5923566cd8bcf70aefa1eefacf21f96e328be45 # main
with:
checkout: 'false'
registry-url: 'https://registry.npmjs.org'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/weekly-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
persist-credentials: false

- uses: SocketDev/socket-registry/.github/actions/setup-and-install@bbe46386c0a2bc6baefd02916234956a38e622d5 # main
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@a5923566cd8bcf70aefa1eefacf21f96e328be45 # main
with:
checkout: 'false'

Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
fetch-depth: 0
persist-credentials: false

- uses: SocketDev/socket-registry/.github/actions/setup-and-install@bbe46386c0a2bc6baefd02916234956a38e622d5 # main
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@a5923566cd8bcf70aefa1eefacf21f96e328be45 # main
with:
checkout: 'false'

Expand All @@ -79,7 +79,7 @@ jobs:
git checkout -b "$BRANCH_NAME" HEAD~1
echo "branch=$BRANCH_NAME" >> $GITHUB_OUTPUT

- uses: SocketDev/socket-registry/.github/actions/setup-git-signing@bbe46386c0a2bc6baefd02916234956a38e622d5 # main
- uses: SocketDev/socket-registry/.github/actions/setup-git-signing@a5923566cd8bcf70aefa1eefacf21f96e328be45 # main
with:
gpg-private-key: ${{ secrets.BOT_GPG_PRIVATE_KEY }}

Expand Down Expand Up @@ -332,7 +332,7 @@ jobs:
test.log
retention-days: 7

- uses: SocketDev/socket-registry/.github/actions/cleanup-git-signing@bbe46386c0a2bc6baefd02916234956a38e622d5 # main
- uses: SocketDev/socket-registry/.github/actions/cleanup-git-signing@a5923566cd8bcf70aefa1eefacf21f96e328be45 # main
if: always()

notify:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "socket-cli-monorepo",
"version": "0.0.0",
"packageManager": "pnpm@11.0.0-rc.0",
"packageManager": "pnpm@11.0.0-rc.2",
"private": true,
"engines": {
"node": ">=25.9.0",
"pnpm": ">=11.0.0-rc.0"
"pnpm": ">=11.0.0-rc.2"
},
"scripts": {
"// Build": "",
Expand Down
4 changes: 3 additions & 1 deletion packages/cli/src/utils/coana/spawn.mts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { spawnNode } from '../spawn/spawn-node.mjs'

import type { IpcObject } from '../ipc.mts'
import type { CResult } from '../../types.mjs'
import type { StdioOptions } from 'node:child_process'
import type { SpawnExtra, SpawnOptions } from '@socketsecurity/lib/spawn'

export type CoanaSpawnOptions = SpawnOptions & {
Expand Down Expand Up @@ -70,7 +71,8 @@ export async function spawnCoana(
...mixinsEnv,
...spawnEnv,
},
stdio: spawnExtra?.['stdio'] || 'inherit',
stdio:
(spawnExtra?.['stdio'] as StdioOptions | undefined) ?? 'inherit',
},
)

Expand Down
19 changes: 10 additions & 9 deletions packages/cli/src/utils/dlx/spawn.mts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ import { getDefaultApiToken, getDefaultProxyUrl } from '../socket/sdk.mjs'
import type { IpcObject } from '../ipc.mts'
import type { CResult } from '../../types.mjs'
import type { ExternalTool } from './vfs-extract.mjs'
import type { StdioOptions } from 'node:child_process'
import type {
SpawnExtra,
SpawnOptions,
Expand Down Expand Up @@ -390,7 +391,7 @@ export async function spawnCoanaDlx(
const spawnPromise = spawn(spawnCommand, spawnArgs, {
...dlxOptions,
env: finalEnv,
stdio: spawnExtra?.['stdio'] || 'inherit',
stdio: (spawnExtra?.['stdio'] as StdioOptions | undefined) ?? 'inherit',
})

const output = await spawnPromise
Expand Down Expand Up @@ -469,7 +470,7 @@ export async function spawnCdxgenDlx(
...process.env,
...spawnEnv,
},
stdio: spawnExtra?.['stdio'] || 'inherit',
stdio: (spawnExtra?.['stdio'] as StdioOptions | undefined) ?? 'inherit',
})

return {
Expand Down Expand Up @@ -519,7 +520,7 @@ export async function spawnSfwDlx(
...process.env,
...spawnEnv,
},
stdio: spawnExtra?.['stdio'] || 'inherit',
stdio: (spawnExtra?.['stdio'] as StdioOptions | undefined) ?? 'inherit',
})

return {
Expand Down Expand Up @@ -572,7 +573,7 @@ export async function spawnSocketPatchDlx(
...process.env,
...spawnEnv,
},
stdio: spawnExtra?.['stdio'] || 'inherit',
stdio: (spawnExtra?.['stdio'] as StdioOptions | undefined) ?? 'inherit',
})

return {
Expand All @@ -590,7 +591,7 @@ export async function spawnSocketPatchDlx(
...process.env,
...spawnEnv,
},
stdio: spawnExtra?.['stdio'] || 'inherit',
stdio: (spawnExtra?.['stdio'] as StdioOptions | undefined) ?? 'inherit',
})

return {
Expand Down Expand Up @@ -672,7 +673,7 @@ async function spawnToolVfs(
...process.env,
...spawnEnv,
},
stdio: spawnExtra?.['stdio'] || 'inherit',
stdio: (spawnExtra?.['stdio'] as StdioOptions | undefined) ?? 'inherit',
})

return {
Expand Down Expand Up @@ -1657,7 +1658,7 @@ async function spawnTrivyDlx(
...process.env,
...spawnEnv,
},
stdio: spawnExtra?.['stdio'] || 'inherit',
stdio: (spawnExtra?.['stdio'] as StdioOptions | undefined) ?? 'inherit',
})

return {
Expand Down Expand Up @@ -1719,7 +1720,7 @@ async function spawnTrufflehogDlx(
...process.env,
...spawnEnv,
},
stdio: spawnExtra?.['stdio'] || 'inherit',
stdio: (spawnExtra?.['stdio'] as StdioOptions | undefined) ?? 'inherit',
})

return {
Expand Down Expand Up @@ -1781,7 +1782,7 @@ async function spawnOpengrepDlx(
...process.env,
...spawnEnv,
},
stdio: spawnExtra?.['stdio'] || 'inherit',
stdio: (spawnExtra?.['stdio'] as StdioOptions | undefined) ?? 'inherit',
})

return {
Expand Down
20 changes: 20 additions & 0 deletions packages/cli/src/utils/spawn/spawn-node.mts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,22 @@ import type {
SpawnExtra,
} from '@socketsecurity/lib/spawn'

/**
* Narrows a spawned process to the shape required by
* `sendBootstrapHandshake` (i.e. `.send` is a callable, not undefined).
* The typeof-on-a-property guard can't flow to the parent object, so
* we need an explicit assertion function.
*/
function assertHasSend<T extends { send?: unknown }>(
proc: T,
): asserts proc is T & { send: (message: unknown) => void } {
if (typeof proc.send !== 'function') {
throw new TypeError(
'spawn-node: expected IPC channel on child process (send is undefined)',
)
}
}

/**
* Ensures stdio configuration includes IPC channel for process communication.
* Converts various stdio formats to include 'ipc' as the fourth element.
Expand Down Expand Up @@ -117,6 +133,10 @@ export function spawnNode(
extra,
)

// `ensureIpcInStdio` above guarantees an IPC channel in stdio, so
// `.send` should always be a function here. Narrow explicitly via an
// assertion function so the call site doesn't need a structural cast.
assertHasSend(spawnResult.process)
sendBootstrapHandshake(
spawnResult.process,
// Always send IPC handshake with bootstrap indicators + custom data.
Expand Down
18 changes: 17 additions & 1 deletion packages/cli/src/utils/validation/ipc.mts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,23 @@

import { randomBytes } from 'node:crypto'

import type { IpcHandshake, IpcMessage, IpcStub } from '@socketsecurity/lib/ipc'
import type { IpcStub } from '@socketsecurity/lib/ipc'

export interface IpcMessage<T = unknown> {
data: T
id: string
timestamp: number
type: string
}

export interface IpcHandshake extends IpcMessage<{
apiToken?: string | undefined
appName: string
pid: number
version: string
}> {
type: 'handshake'
}

/**
* Check if a value is a valid IPC message.
Expand Down
Loading
Loading