Skip to content

Commit 4617a83

Browse files
committed
fix: update missed external-tools.json references to bundle-tools.json
1 parent ee16d6d commit 4617a83

7 files changed

Lines changed: 32 additions & 32 deletions

File tree

.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

docs/external-tools.md

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`

scripts/validate-checksums.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* @fileoverview Build-time validation for SHA-256 checksums.
55
* Ensures all required platform-specific tool assets have checksums defined
6-
* in external-tools.json before building SEA binaries.
6+
* in bundle-tools.json before building SEA binaries.
77
*
88
* This script is a security requirement - builds MUST NOT proceed if any
99
* checksums are missing for downloadable binaries.
@@ -28,7 +28,7 @@ const rootPath = path.join(__dirname, '..')
2828
// Load external tools configuration.
2929
const externalToolsPath = path.join(
3030
rootPath,
31-
'packages/cli/external-tools.json',
31+
'packages/cli/bundle-tools.json',
3232
)
3333
const externalTools = JSON.parse(readFileSync(externalToolsPath, 'utf8'))
3434

@@ -64,7 +64,7 @@ function validateChecksums() {
6464
const toolConfig = externalTools[toolName]
6565

6666
if (!toolConfig) {
67-
errors.push(`Tool "${toolName}" not found in external-tools.json`)
67+
errors.push(`Tool "${toolName}" not found in bundle-tools.json`)
6868
continue
6969
}
7070

@@ -128,7 +128,7 @@ function validateChecksums() {
128128
}
129129
console.log('')
130130
logger.error(
131-
'All external tool assets MUST have SHA-256 checksums defined in external-tools.json.',
131+
'All external tool assets MUST have SHA-256 checksums defined in bundle-tools.json.',
132132
)
133133
logger.error('This is a security requirement to prevent supply chain attacks.')
134134
return false

0 commit comments

Comments
 (0)