This document provides detailed information about external tool checksums, the sync script, and troubleshooting for the updating-checksums skill.
- External Tools Inventory
- Checksum Sync Script
- GitHub Release Tools
- Checksum Formats
- Edge Cases
- Troubleshooting
| Tool | Repository | Release Tag Format | Has checksums.txt |
|---|---|---|---|
| opengrep | opengrep/opengrep | v*.*.* |
Yes |
| python | astral-sh/python-build-standalone | *.*.* |
No (computed) |
| socket-patch | SocketDev/socket-patch | v*.*.* |
Varies |
| sfw | SocketDev/sfw-free | v*.*.* |
Varies |
| trivy | aquasecurity/trivy | v*.*.* |
Yes |
| trufflehog | trufflesecurity/trufflehog | v*.*.* |
Yes |
| Tool | Type | Integrity Method |
|---|---|---|
| @coana-tech/cli | npm | SRI integrity hash |
| @cyclonedx/cdxgen | npm | SRI integrity hash |
| synp | npm | SRI integrity hash |
| socketsecurity | pypi | SRI integrity hash |
| socket-basics | github-source | None |
packages/cli/scripts/sync-checksums.mjs
- Reads
packages/cli/bundle-tools.json - Filters tools with
type: "github-release" - For each tool:
a. Fetches the GitHub release by tag
b. Looks for
checksums.txtasset c. If found: parses SHA-256 hashes from checksums.txt d. If not found: downloads each release asset and computes SHA-256 viacrypto.createHash('sha256') - Compares new checksums with existing
- Writes updated checksums to bundle-tools.json
# Sync all GitHub release tools
node packages/cli/scripts/sync-checksums.mjs
# Sync specific tool only
node packages/cli/scripts/sync-checksums.mjs --tool=opengrep
# Preview changes without writing
node packages/cli/scripts/sync-checksums.mjs --dry-run
# Force update even if unchanged
node packages/cli/scripts/sync-checksums.mjs --forceSyncing checksums for N GitHub release tool(s)...
[opengrep] opengrep/opengrep @ v1.16.0
Found checksums.txt, downloading...
Parsed 5 checksums from checksums.txt
Updated: 2 checksums, Unchanged: 3 checksums
[trivy] aquasecurity/trivy @ v0.58.2
Found checksums.txt, downloading...
Parsed 12 checksums from checksums.txt
Unchanged: 12 checksums
Summary: X updated, Y unchanged
Each tool has specific asset naming conventions:
opengrep:
opengrep-core_linux_aarch64.tar.gzopengrep-core_linux_x86.tar.gzopengrep-core_osx_aarch64.tar.gzopengrep-core_osx_x86.tar.gzopengrep-core_windows_x86.zip- Includes
checksums.txt
python (python-build-standalone):
cpython-{version}+{buildTag}-{target}-{config}.tar.zst- No checksums.txt — hashes computed by downloading each asset
socket-patch:
socket-patch-aarch64-apple-darwin.tar.gzsocket-patch-x86_64-apple-darwin.tar.gzsocket-patch-aarch64-unknown-linux-gnu.tar.gzsocket-patch-x86_64-unknown-linux-musl.tar.gzsocket-patch-aarch64-pc-windows-msvc.zipsocket-patch-x86_64-pc-windows-msvc.zip
sfw (sfw-free):
sfw-free-linux-arm64sfw-free-linux-x86_64sfw-free-macos-arm64sfw-free-macos-x86_64sfw-free-musl-linux-arm64sfw-free-musl-linux-x86_64sfw-free-windows-x86_64.exe
trivy:
trivy_{version}_Linux-64bit.tar.gztrivy_{version}_Linux-ARM64.tar.gztrivy_{version}_macOS-64bit.tar.gztrivy_{version}_macOS-ARM64.tar.gztrivy_{version}_windows-64bit.zip- Includes
trivy_{version}_checksums.txt
trufflehog:
trufflehog_{version}_linux_amd64.tar.gztrufflehog_{version}_linux_arm64.tar.gztrufflehog_{version}_darwin_amd64.tar.gztrufflehog_{version}_darwin_arm64.tar.gztrufflehog_{version}_windows_amd64.tar.gztrufflehog_{version}_windows_arm64.tar.gz- Includes checksums in release
In bundle-tools.json, checksums are stored as:
{
"checksums": {
"asset-filename.tar.gz": "hex-encoded-sha256-hash",
"asset-filename-2.tar.gz": "hex-encoded-sha256-hash"
}
}Standard format used by most tools:
sha256hash filename
sha256hash filename
- Two or more spaces between hash and filename
- SHA-256 hex-encoded (64 characters)
- One entry per line
When no checksums.txt is available:
// Script computes SHA-256 by streaming the downloaded file
const hash = crypto.createHash('sha256')
const stream = fs.createReadStream(filePath)
stream.pipe(hash)
// Result: hex-encoded SHA-256The 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.
This tool has no checksums.txt in releases. The sync script must:
- Download each release asset
- Compute SHA-256 locally
- This is significantly slower than parsing checksums.txt
Different tools use different tag formats:
- Most use
v{version}(e.g.,v1.16.0) - python-build-standalone uses bare version (e.g.,
3.11.14) - The
githubReleasefield in bundle-tools.json stores the exact tag
If someone updates a tool version in bundle-tools.json but forgets to sync checksums:
- SEA builds will fail integrity verification
- Always run checksum sync after any version change
Symptom: Script fails with 403 or rate limit error.
Solution:
# Check current rate limit
gh api rate_limit --jq '.rate'
# Ensure authenticated
gh auth statusAuthenticated requests get 5,000 requests/hour vs 60 for unauthenticated.
Symptom: Script reports release not found for a tool.
Cause: The githubRelease tag in bundle-tools.json doesn't match any release.
Solution:
# Verify release exists
gh release view <tag> --repo <owner/repo>
# List recent releases
gh release list --repo <owner/repo> --limit 5Symptom: Checksums changed but tool version didn't.
Cause: Release assets were re-uploaded (some projects rebuild releases).
Solution: This is expected in rare cases. Review the diff to ensure it's a legitimate update, then commit.
Symptom: Updated bundle-tools.json is invalid JSON.
Solution:
# Validate JSON
node -e "JSON.parse(require('fs').readFileSync('packages/cli/bundle-tools.json'))"
# If corrupted, restore and retry
git checkout packages/cli/bundle-tools.json
node packages/cli/scripts/sync-checksums.mjsSymptom: python-build-standalone sync times out (large assets).
Solution:
- Sync specific tool:
--tool=python - Ensure stable network connection
- The script handles retries for individual assets