Skip to content

Commit fa6d585

Browse files
authored
chore: rename external-tools.json to bundle-tools.json (#1190)
* SDK v4 adds checkMalware() for integrated malware detection. * fix: migrate getSupportedScanFiles to getSupportedFiles (SDK v4) SDK v4 removed deprecated getSupportedScanFiles(). The replacement getSupportedFiles(orgSlug) requires an org parameter. Updated all type references from getReportSupportedFiles to getSupportedFiles. * fix(tests): update supported files tests for SDK v4 getSupportedFiles(orgSlug) * fix(tests): correct mock path for fetch-default-org-slug (.mjs not .mts) * fix: pass orgSlug to fetchSupportedScanFileNames instead of discovering internally * fix: update missed external-tools.json references to bundle-tools.json * fix: rename docs/external-tools.md to bundle-tools.md * fix: update $schema description to match bundle-tools rename * chore: migrate bundle-tools.json to v3 schema Migrate JSON and all consumers together: - type 'npm' → packageManager: 'npm' - type 'github-release' → repository: 'github:...' + release: 'asset' - type 'github-source' → repository + release: 'archive' + packageManager: 'pip' - type 'pypi' → packageManager: 'pip' - githubRelease → version - buildTag → tag - npmPackage/npmVersion → npm: { package, version }
1 parent 94fbd1f commit fa6d585

24 files changed

Lines changed: 148 additions & 146 deletions

.claude/commands/sync-checksums.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Sync SHA-256 checksums from GitHub releases to external-tools.json using the syncing-checksums skill.
1+
Sync SHA-256 checksums from GitHub releases to bundle-tools.json using the syncing-checksums skill.
22

33
## What it does
44

55
1. Fetches checksums.txt from GitHub releases (or computes from assets)
6-
2. Updates packages/cli/external-tools.json
6+
2. Updates packages/cli/bundle-tools.json
77
3. Validates JSON syntax
88
4. Commits changes (if any)
99

.claude/skills/_shared/security-tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ No install step needed — available after `pnpm install`.
1111
## Zizmor
1212

1313
Not an npm package. Installed via `pnpm run setup` which downloads the pinned version
14-
from GitHub releases with SHA256 checksum verification (see `external-tools.json`).
14+
from GitHub releases with SHA256 checksum verification (see `bundle-tools.json`).
1515

1616
The binary is cached at `.cache/external-tools/zizmor/{version}-{platform}/zizmor`.
1717

.claude/skills/updating-checksums/SKILL.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: updating-checksums
33
description: >
4-
Syncs SHA-256 checksums from GitHub releases to external-tools.json.
4+
Syncs SHA-256 checksums from GitHub releases to bundle-tools.json.
55
Triggers when user mentions "update checksums", "sync checksums", or after
66
releasing new tool versions.
77
user-invocable: true
@@ -11,7 +11,7 @@ allowed-tools: Bash, Read, Edit
1111
# updating-checksums
1212

1313
<task>
14-
Your task is to sync SHA-256 checksums from GitHub releases to the embedded `external-tools.json` file, ensuring SEA builds have up-to-date integrity verification.
14+
Your task is to sync SHA-256 checksums from GitHub releases to the embedded `bundle-tools.json` file, ensuring SEA builds have up-to-date integrity verification.
1515
</task>
1616

1717
<constraints>
@@ -24,10 +24,10 @@ Your task is to sync SHA-256 checksums from GitHub releases to the embedded `ext
2424

2525
## Phases
2626

27-
1. **Check Current State** - Review current checksums and tool versions in `packages/cli/external-tools.json`.
27+
1. **Check Current State** - Review current checksums and tool versions in `packages/cli/bundle-tools.json`.
2828
2. **Sync Checksums** - Run `node packages/cli/scripts/sync-checksums.mjs`. Tries `checksums.txt` from the release first; falls back to downloading assets and computing SHA-256.
29-
3. **Verify Changes** - `git diff packages/cli/external-tools.json`; validate JSON syntax.
30-
4. **Commit Changes** - If updated, commit `packages/cli/external-tools.json`.
29+
3. **Verify Changes** - `git diff packages/cli/bundle-tools.json`; validate JSON syntax.
30+
4. **Commit Changes** - If updated, commit `packages/cli/bundle-tools.json`.
3131

3232
## Commands
3333

.claude/skills/updating-checksums/reference.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ This document provides detailed information about external tool checksums, the s
4646

4747
### How It Works
4848

49-
1. Reads `packages/cli/external-tools.json`
49+
1. Reads `packages/cli/bundle-tools.json`
5050
2. Filters tools with `type: "github-release"`
5151
3. For each tool:
5252
a. Fetches the GitHub release by tag
5353
b. Looks for `checksums.txt` asset
5454
c. If found: parses SHA-256 hashes from checksums.txt
5555
d. If not found: downloads each release asset and computes SHA-256 via `crypto.createHash('sha256')`
5656
4. Compares new checksums with existing
57-
5. Writes updated checksums to external-tools.json
57+
5. Writes updated checksums to bundle-tools.json
5858

5959
### Command Reference
6060

@@ -146,7 +146,7 @@ Each tool has specific asset naming conventions:
146146

147147
### Checksum Storage Format
148148

149-
In `external-tools.json`, checksums are stored as:
149+
In `bundle-tools.json`, checksums are stored as:
150150

151151
```json
152152
{
@@ -192,7 +192,7 @@ stream.pipe(hash)
192192

193193
### Tool with Dual Configuration (sfw)
194194

195-
The `sfw` tool has both a GitHub release binary (`SocketDev/sfw-free`) and an npm package (`sfw` on npmjs.com). Both are tracked in the same `external-tools.json` entry via `type: "github-release"` for the binary checksums and `npmPackage`/`npmVersion` fields for the npm component. The checksums skill only handles the GitHub release binary checksums; the npm package version is updated separately via `pnpm run update`.
195+
The `sfw` tool has both a GitHub release binary (`SocketDev/sfw-free`) and an npm package (`sfw` on npmjs.com). Both are tracked in the same `bundle-tools.json` entry via `type: "github-release"` for the binary checksums and `npmPackage`/`npmVersion` fields for the npm component. The checksums skill only handles the GitHub release binary checksums; the npm package version is updated separately via `pnpm run update`.
196196

197197
### python-build-standalone
198198

@@ -206,11 +206,11 @@ This tool has no checksums.txt in releases. The sync script must:
206206
Different tools use different tag formats:
207207
- Most use `v{version}` (e.g., `v1.16.0`)
208208
- python-build-standalone uses bare version (e.g., `3.11.14`)
209-
- The `githubRelease` field in external-tools.json stores the exact tag
209+
- The `githubRelease` field in bundle-tools.json stores the exact tag
210210

211211
### Stale Checksums After Version Bump
212212

213-
If someone updates a tool version in external-tools.json but forgets to sync checksums:
213+
If someone updates a tool version in bundle-tools.json but forgets to sync checksums:
214214
- SEA builds will fail integrity verification
215215
- Always run checksum sync after any version change
216216

@@ -237,7 +237,7 @@ Authenticated requests get 5,000 requests/hour vs 60 for unauthenticated.
237237

238238
**Symptom:** Script reports release not found for a tool.
239239

240-
**Cause:** The `githubRelease` tag in external-tools.json doesn't match any release.
240+
**Cause:** The `githubRelease` tag in bundle-tools.json doesn't match any release.
241241

242242
**Solution:**
243243
```bash
@@ -258,15 +258,15 @@ gh release list --repo <owner/repo> --limit 5
258258

259259
### JSON Validation Failure
260260

261-
**Symptom:** Updated external-tools.json is invalid JSON.
261+
**Symptom:** Updated bundle-tools.json is invalid JSON.
262262

263263
**Solution:**
264264
```bash
265265
# Validate JSON
266-
node -e "JSON.parse(require('fs').readFileSync('packages/cli/external-tools.json'))"
266+
node -e "JSON.parse(require('fs').readFileSync('packages/cli/bundle-tools.json'))"
267267

268268
# If corrupted, restore and retry
269-
git checkout packages/cli/external-tools.json
269+
git checkout packages/cli/bundle-tools.json
270270
node packages/cli/scripts/sync-checksums.mjs
271271
```
272272

.claude/skills/updating/reference.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Updated via `pnpm run update` which runs `scripts/update.mjs`:
2828

2929
Updated via the `updating-checksums` skill which runs `packages/cli/scripts/sync-checksums.mjs`:
3030

31-
- Syncs SHA-256 checksums from GitHub releases to `packages/cli/external-tools.json`
31+
- Syncs SHA-256 checksums from GitHub releases to `packages/cli/bundle-tools.json`
3232
- Only processes tools with `type: "github-release"`
3333

3434
---
@@ -68,9 +68,9 @@ After update, these files may be modified:
6868

6969
## External Tool Checksums
7070

71-
### external-tools.json Structure
71+
### bundle-tools.json Structure
7272

73-
**Location:** `packages/cli/external-tools.json`
73+
**Location:** `packages/cli/bundle-tools.json`
7474

7575
**Tool types:**
7676

@@ -103,10 +103,10 @@ After update, these files may be modified:
103103
**Location:** `packages/cli/scripts/sync-checksums.mjs`
104104

105105
**Process:**
106-
1. Reads `external-tools.json` for GitHub release tools
106+
1. Reads `bundle-tools.json` for GitHub release tools
107107
2. For each tool, tries to download `checksums.txt` from the release
108108
3. If no checksums.txt, downloads each asset and computes SHA-256
109-
4. Updates embedded checksums in `external-tools.json`
109+
4. Updates embedded checksums in `bundle-tools.json`
110110

111111
**Options:**
112112
- `--tool=<name>` - Sync specific tool only
@@ -115,7 +115,7 @@ After update, these files may be modified:
115115

116116
### When to Sync Checksums
117117

118-
- After manually updating tool versions in external-tools.json
118+
- After manually updating tool versions in bundle-tools.json
119119
- After new GitHub releases are published for any tool
120120
- As part of the full update cycle (run after npm updates)
121121

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Socket CLI integrates with external security tools for scanning, analysis, and v
2727

2828
## Configuration
2929

30-
All tools are defined in `packages/cli/external-tools.json`:
30+
All tools are defined in `packages/cli/bundle-tools.json`:
3131

3232
```json
3333
{
@@ -129,7 +129,7 @@ When installed via npm, tools are downloaded at runtime.
129129

130130
### Checksum Verification
131131

132-
All downloads are verified with SHA-256 checksums defined in `external-tools.json`:
132+
All downloads are verified with SHA-256 checksums defined in `bundle-tools.json`:
133133

134134
```json
135135
{
@@ -168,7 +168,7 @@ Environment variables for development/testing:
168168

169169
| File | Purpose |
170170
|------|---------|
171-
| `external-tools.json` | Tool definitions, versions, checksums |
171+
| `bundle-tools.json` | Tool definitions, versions, checksums |
172172
| `src/utils/dlx/resolve-binary.mts` | Binary resolution logic |
173173
| `src/utils/dlx/spawn.mts` | Tool spawning (VFS + dlx) |
174174
| `src/utils/dlx/vfs-extract.mts` | VFS extraction utilities |
@@ -181,7 +181,7 @@ Environment variables for development/testing:
181181

182182
## Adding a New Tool
183183

184-
1. Add entry to `external-tools.json` with version and checksums
184+
1. Add entry to `bundle-tools.json` with version and checksums
185185
2. Create `src/env/{tool}-version.mts` version getter
186186
3. Create `src/env/{tool}-checksums.mts` checksum getter (if applicable)
187187
4. Add resolve function in `src/utils/dlx/resolve-binary.mts`
Lines changed: 32 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
{
2-
"$schema": "External tools configuration for Socket CLI VFS bundling",
3-
"$comment": "Build process uses @npmcli/arborist (scripts/sea-build-utils/npm-packages.mjs) to download npm packages with full dependency trees. npm packages are bundled with node_modules/ into VFS alongside security tool binaries. For github-release types, 'githubRelease' is the release tag (any format: v1.6.1, 3.11.14, etc.).",
2+
"$schema": "Bundle tools configuration for Socket CLI VFS bundling",
43
"@coana-tech/cli": {
54
"description": "Coana CLI for static analysis and reachability detection",
6-
"type": "npm",
7-
"package": "@coana-tech/cli",
85
"version": "14.12.165",
6+
"packageManager": "npm",
97
"integrity": "sha512-Fs/gGzBEFl23x0Xw+eBOnyX2WUaoc82ppgZrrDN9hpB84CN8r0ZEw22IQRpiJTmhmOlbSwiArpRw45VkgJY5sw=="
108
},
119
"@cyclonedx/cdxgen": {
1210
"description": "CycloneDX SBOM generator for software bill of materials",
13-
"type": "npm",
14-
"package": "@cyclonedx/cdxgen",
1511
"version": "12.0.0",
12+
"packageManager": "npm",
1613
"integrity": "sha512-RRXEZ1eKHcU+Y/2AnfIg30EQRbOmlEpaJddmMVetpXeYpnxDy/yjBM67jXNKkA4iZYjZzfWe7I5GuxckRmuoqg=="
1714
},
1815
"opengrep": {
1916
"description": "OpenGrep SAST/code analysis engine (fork of Semgrep)",
20-
"type": "github-release",
21-
"repository": "opengrep/opengrep",
22-
"githubRelease": "v1.16.0",
17+
"repository": "github:opengrep/opengrep",
18+
"release": "asset",
19+
"version": "v1.16.0",
2320
"checksums": {
2421
"opengrep-core_linux_aarch64.tar.gz": "e6a92e2c465b53284ae326d20b315acbd2eb99bc9ea4b3af48db6379306f3a82",
2522
"opengrep-core_linux_x86.tar.gz": "4d474141329983c4ddd7a6cd586759deecc7f3fa9aee6e6eeab8c55759dc816b",
@@ -30,10 +27,10 @@
3027
},
3128
"python": {
3229
"description": "Python runtime from python-build-standalone",
33-
"type": "github-release",
34-
"repository": "astral-sh/python-build-standalone",
35-
"githubRelease": "3.11.14",
36-
"buildTag": "20260203",
30+
"repository": "github:astral-sh/python-build-standalone",
31+
"release": "asset",
32+
"version": "3.11.14",
33+
"tag": "20260203",
3734
"checksums": {
3835
"cpython-3.11.14+20260203-aarch64-apple-darwin-install_only.tar.gz": "63e3352fefd3b6494f73f46f51c6581c57a7e0d98775e6e00229d14a67ec3ce9",
3936
"cpython-3.11.14+20260203-aarch64-pc-windows-msvc-install_only.tar.gz": "cb7828c131a005da367f7dba3a561bed91619452de870e531ee03344b2ac346f",
@@ -47,26 +44,25 @@
4744
},
4845
"socket-basics": {
4946
"description": "Socket Basics - integrated SAST, secret scanning, and container analysis",
50-
"type": "github-source",
51-
"repository": "SocketDev/socket-basics",
52-
"githubRelease": "v2.0.2",
53-
"package": "socket_basics"
47+
"repository": "github:SocketDev/socket-basics",
48+
"release": "archive",
49+
"version": "v2.0.2",
50+
"packageManager": "pip"
5451
},
5552
"socketsecurity": {
5653
"description": "Socket Python CLI (socket-python-cli)",
57-
"type": "pypi",
58-
"package": "socketsecurity",
5954
"version": "2.2.70",
55+
"packageManager": "pip",
6056
"checksums": {
6157
"socketsecurity-2.2.70-py3-none-any.whl": "8633c2a7f204cc5cec18d8ed04cfd09aa448f7e2257345596435493d2102ba5d",
6258
"socketsecurity-2.2.70.tar.gz": "e5212fb9b6b7bee3c5d936efe439508df76a7d0d81b99f84f6eafe760f3d77b7"
6359
}
6460
},
6561
"socket-patch": {
6662
"description": "Socket Patch CLI for applying security patches (Rust binary)",
67-
"type": "github-release",
68-
"repository": "SocketDev/socket-patch",
69-
"githubRelease": "v2.0.0",
63+
"repository": "github:SocketDev/socket-patch",
64+
"release": "asset",
65+
"version": "v2.0.0",
7066
"checksums": {
7167
"socket-patch-aarch64-apple-darwin.tar.gz": "dd8f778aef4db3f2c5000cd870101a31d1bb03822158d76e5bd2e773098428f0",
7268
"socket-patch-aarch64-pc-windows-msvc.zip": "5c0bbfc12d2b6f30a0f79caf4bff85a1eac6baf9541c46d9af4b3f37b05bd574",
@@ -78,11 +74,9 @@
7874
},
7975
"sfw": {
8076
"description": "Socket Firewall (sfw) - GitHub binary for SEA, npm package for CLI",
81-
"type": "github-release",
82-
"repository": "SocketDev/sfw-free",
83-
"githubRelease": "v1.6.1",
84-
"npmPackage": "sfw",
85-
"npmVersion": "2.0.4",
77+
"repository": "github:SocketDev/sfw-free",
78+
"release": "asset",
79+
"version": "v1.6.1",
8680
"checksums": {
8781
"sfw-free-linux-arm64": "df2eedb2daf2572eee047adb8bfd81c9069edcb200fc7d3710fca98ec3ca81a1",
8882
"sfw-free-linux-x86_64": "4a1e8b65e90fce7d5fd066cf0af6c93d512065fa4222a475c8d959a6bc14b9ff",
@@ -91,20 +85,23 @@
9185
"sfw-free-musl-linux-arm64": "41e5ebfe84e33eb7f34846eeb1b0e0c3039b2ba8bcdb87f4a75a5ccb89c64ae1",
9286
"sfw-free-musl-linux-x86_64": "19f26c163311d5d0b184d305304972d26c52e445659c9142cefc7d8a11e06c3a",
9387
"sfw-free-windows-x86_64.exe": "c953e62ad7928d4d8f2302f5737884ea1a757babc26bed6a42b9b6b68a5d54af"
88+
},
89+
"npm": {
90+
"package": "sfw",
91+
"version": "2.0.4"
9492
}
9593
},
9694
"synp": {
9795
"description": "Tool for converting between yarn.lock and package-lock.json",
98-
"type": "npm",
99-
"package": "synp",
10096
"version": "1.9.14",
97+
"packageManager": "npm",
10198
"integrity": "sha512-0e4u7KtrCrMqvuXvDN4nnHSEQbPlONtJuoolRWzut0PfuT2mEOvIFnYFHEpn5YPIOv7S5Ubher0b04jmYRQOzQ=="
10299
},
103100
"trivy": {
104101
"description": "Trivy container and filesystem vulnerability scanner",
105-
"type": "github-release",
106-
"repository": "aquasecurity/trivy",
107-
"githubRelease": "v0.69.2",
102+
"repository": "github:aquasecurity/trivy",
103+
"release": "asset",
104+
"version": "v0.69.2",
108105
"checksums": {
109106
"trivy_0.69.2_Linux-64bit.tar.gz": "affa59a1e37d86e4b8ab2cd02f0ab2e63d22f1bf9cf6a7aa326c884e25e26ce3",
110107
"trivy_0.69.2_Linux-ARM64.tar.gz": "c73b97699c317b0d25532b3f188564b4e29d13d5472ce6f8eb078082546a6481",
@@ -115,9 +112,9 @@
115112
},
116113
"trufflehog": {
117114
"description": "TruffleHog secret and credential detection",
118-
"type": "github-release",
119-
"repository": "trufflesecurity/trufflehog",
120-
"githubRelease": "v3.93.1",
115+
"repository": "github:trufflesecurity/trufflehog",
116+
"release": "asset",
117+
"version": "v3.93.1",
121118
"checksums": {
122119
"trufflehog_3.93.1_darwin_amd64.tar.gz": "f1f4ecbda3996b88dc70cf6aef2c469c4902efb591aca86128d6305d606d8e07",
123120
"trufflehog_3.93.1_darwin_arm64.tar.gz": "d65a2ad0f043a9d48a97176f28533890e558817e2fb7dd1e34132653b61be4a0",

0 commit comments

Comments
 (0)