Repository navigation
MLAI-1333 - Run skill-governance hooks through a node launcher for Windows - #94
Open
nadav-dvir wants to merge 1 commit into
Open
nadav-dvir wants to merge 1 commit into
nadav-dvir wants to merge 1 commit into
Conversation
The governed hooks (PreToolUse, UserPromptExpansion) and the SessionStart
agent-guard pre-warm were `shell: "bash"` one-liners, so on Windows without
Git Bash they never ran and skills were allowed unchecked.
- scripts/enforce-skill.mjs: computes the enforcement deadline, sets the npm
fetch bounds, and spawns `npx @jfrog/agent-guard --enforce-skill --client
claude-code` (npx.cmd through cmd.exe on Windows). Exit 2 and stdout pass
through; a spawn failure fails open.
- scripts/warm-agent-guard.mjs: the async pre-warm (`--version`, online, npm
default fetch policy, always exits 0).
- hooks.json: all three hooks are now `node "${CLAUDE_PLUGIN_ROOT}/..."` with
no `shell` field.
- validate-enforce-hook.mjs: asserts the launcher wiring and spawn plans,
including the Windows plan, and executes both launchers against a stub npx.
Mirrors the same launcher in jfrog/vscode-plugin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The governed hooks (PreToolUse, UserPromptExpansion) and the SessionStart agent-guard pre-warm were
shell: "bash"one-liners, so on Windows without Git Bash they never ran and skills were allowed unchecked.npx @jfrog/agent-guard --enforce-skill --client claude-code(npx.cmd through cmd.exe on Windows). Exit 2 and stdout pass through; a spawn failure fails open.--version, online, npm default fetch policy, always exits 0).node "${CLAUDE_PLUGIN_ROOT}/..."with noshellfield.Mirrors the same launcher in jfrog/vscode-plugin.