Skip to content

Add automatic update checks for security tools (zizmor, SFW)#1186

Open
John-David Dalton (jdalton) wants to merge 4 commits intomainfrom
feat/security-tools-updater
Open

Add automatic update checks for security tools (zizmor, SFW)#1186
John-David Dalton (jdalton) wants to merge 4 commits intomainfrom
feat/security-tools-updater

Conversation

@jdalton
Copy link
Copy Markdown
Contributor

@jdalton John-David Dalton (jdalton) commented Apr 10, 2026

What this adds

A version checker that runs as part of the /update workflow:

  • Zizmor: checks GitHub releases, respects pnpm minimumReleaseAge cooldown (reads from pnpm-workspace.yaml)
  • SFW (Socket Firewall): checks both free and enterprise releases, no cooldown (Socket-owned)
  • Claude Code: syncs @anthropic-ai/claude-code catalog version from installed binary

When new versions are found, the script updates the embedded checksums in setup-security-tools/index.mts in-place.

Files

  • .claude/hooks/setup-security-tools/update.mts — the version checker
  • .claude/skills/updating/SKILL.md — adds phases 3b (security tools) and 3c (Claude Code sync)

Depends on

PR #1185 (setup-security-tools) must be merged first — update.mts modifies files created by that PR.


Note

Medium Risk
Introduces an automated script that fetches GitHub release metadata and downloads binaries to recompute embedded checksums, which could impact the integrity/availability of the security-tool setup if parsing or downloads fail. Changes are limited to tooling/docs and .gitignore, not runtime application logic.

Overview
Adds a new Node script (.claude/hooks/setup-security-tools/update.mts) that checks GitHub releases/latest for zizmor and Socket Firewall (sfw-free and enterprise), then updates the embedded version/checksum constants in the setup-security-tools hook when newer artifacts are found.

zizmor updates are gated by pnpm’s minimumReleaseAge cooldown (read from pnpm-workspace.yaml), while SFW updates bypass cooldown and always refresh checksums by downloading platform assets and hashing them.

Updates the updating skill docs to include this security-tools update step, and adjusts .gitignore to track .claude/hooks/ and .claude/settings.json instead of ignoring all of .claude/.

Reviewed by Cursor Bugbot for commit 9e65251. Configure here.

Checks for new zizmor and SFW releases, respects pnpm
minimumReleaseAge cooldown for third-party tools, updates
embedded checksums. Also adds Claude Code version sync phase.
- Add else clause when oldHash is undefined so allFound is set to false,
  preventing version bump with missing checksum entries
- Deduplicate download-and-hash logic in fetchSfwChecksums by computing
  the URL once before the shared try/catch block
@jdalton
Copy link
Copy Markdown
Contributor Author

Cursor (@cursor) review

SFW_FREE_CHECKSUMS and SFW_ENTERPRISE_CHECKSUMS share platform keys
(e.g. 'linux-arm64'). Add objectName parameter to replaceChecksumValue
that scopes regex replacement within the target object block, preventing
cross-object mismatches.
@jdalton
Copy link
Copy Markdown
Contributor Author

Cursor (@cursor) review

Like the zizmor update path, prevent partial checksum updates when some
SFW asset downloads fail. Return unchanged checksums and changed: false
so the caller does not write an inconsistent state.
@jdalton
Copy link
Copy Markdown
Contributor Author

Cursor (@cursor) review

1 similar comment
@jdalton
Copy link
Copy Markdown
Contributor Author

Cursor (@cursor) review

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 9e65251. Configure here.

@jdalton
Copy link
Copy Markdown
Contributor Author

Cursor (@cursor) review

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 9e65251. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant