Skip to content

0.17.0: Antigravity, Droid and Qwen Code targets, PowerShell coverage, and finish lines in compound shell commands - #65

Merged
renezander030 merged 13 commits into
masterfrom
gitlab-merge-10
Nov 30, 2026
Merged

renezander030 merged 13 commits into
masterfrom
gitlab-merge-10

Conversation

@renezander030

Copy link
Copy Markdown
Owner
  1. A finish-line command inside a shell control structure is gated: if ...; then git push; fi, for/while/until loops, ! git push, case arms, { git push; } groups, function bodies and PowerShell script blocks (if (...) { git push }, & { ... }, Invoke-Command { ... }). Before, the leading keyword or brace hid the command and gate allowed it.
  2. skillgate install antigravity gates the Antigravity CLI (agy): a fail-closed PreToolUse hook in .agents/hooks.json, checked by doctor antigravity. gate reads agy's toolCall payload, judges run_command as a shell command and answers in agy's JSON.
  3. skillgate install droid gates Factory Droid: a fail-closed PreToolUse hook on the Execute tool, written to .factory/hooks.json when the project has one and to .factory/settings.json otherwise. doctor droid notices when a new hooks.json hides the settings hook.
  4. skillgate install qwen-code gates Qwen Code: a fail-closed PreToolUse hook on run_shell_command (plus gatedTools) in .qwen/settings.json, checked by doctor qwen-code.
  5. Claude Code's PowerShell tool is gated: install claude-code matches Bash|PowerShell and upgrades a Bash-only hook, gate judges a PowerShell call as a shell command, and doctor claude-code flags a hook that leaves PowerShell out.
  6. Text a shell reads on stdin is matched: echo git push | sh, printf '...' | bash -s and here-strings (bash <<< 'git push'). Text no shell reads stays data.
  7. Codex hooks fail closed on Windows: each hook gets a commandWindows line (cmd.exe /d /s /c "...") that Windows PowerShell 5.1 and cmd.exe both run; doctor codex flags a hook without it.
  8. PowerShell's runners are matched: Invoke-Expression/iex (argument or piped script), powershell -EncodedCommand (decoded and judged) and Start-Process (start, saps).
  9. A backslash a POSIX shell drops no longer hides a finish line (git pu\sh, n\pm publish); Windows paths keep matching.

Two tidy-up commits keep behaviour unchanged: hook payload handling moves into src/payload.ts, and each integration's installer, config file and health rules sit in one table in src/integrations.ts.

Evidence

  • Node 18.20.8, 20.20.2 and 22: npm ci, npm run build, npm test pass, 297 of 297 tests; coverage 95.86% lines, 88.59% branches, 98.24% functions; node dist/src/cli.js check passes.
  • The pull-request CI jobs (test, compat 18/22) ran in the pull-request environment and checkout depth and passed.
  • Each item has a test in test/release-017.test.ts that fails on 0.16.1 and passes here, and an end-to-end run of the built CLI against the published 0.16.1 on throwaway repositories with real hook payloads and the installed hook commands.
  • Not run: native Windows (PowerShell 5.1, cmd.exe, the windows-latest job) and the Go fhe-metrics job; contrib/fhe-metrics is unchanged.

Door

Two-way. New install targets and matcher coverage are additive; the stricter matching only blocks more finish-line forms while gates are unmet, and a release can be reverted or superseded by a patch.

Blast radius

src/command.ts (finish-line matching), src/payload.ts (new: hook payloads and host answers), src/integrations.ts (installers and doctor), src/cli.ts (help text, payload handling), small internal moves in src/core.ts, src/git.ts and src/receipt.ts, docs, contrib examples and tests. Stored formats (receipts, cache, attestations, decision log) and the policy schema are unchanged. Base c55a51e; the first commit is the tidy-up and reviews on its own.

🤖 Generated with Claude Code

renezander030 and others added 13 commits November 29, 2026 03:03
- Hook payload handling (shell tool names, command fields, host answer formats) moves into one module with direct tests.
- Pattern gates share one rule for regex flags.
- The receipt module uses the shared git runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
if/then/elif/else, for/while/until loops, negation with !, case arms, brace
groups, function bodies and PowerShell script blocks no longer hide a
finish-line command from the matcher.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
install antigravity writes a fail-closed PreToolUse hook to .agents/hooks.json.
gate reads the toolCall payload, judges run_command as a shell command and
answers in the host's JSON decision format.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
install droid writes a fail-closed PreToolUse hook on the Execute tool to the
file Droid reads: .factory/hooks.json when present, else .factory/settings.json.
doctor droid notices when a new hooks.json hides the settings hook.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
install qwen-code writes a fail-closed PreToolUse hook on run_shell_command
to .qwen/settings.json, with its timeout in seconds; doctor qwen-code checks it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
install claude-code matches Bash|PowerShell, gate judges a PowerShell call as
a shell command, and doctor flags a Bash-only hook. The contrib examples match
both tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
echo or printf output piped into a shell and a here-string fed to a shell are
read as commands; the same text going to any other program stays data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
install codex writes a commandWindows for each hook: one cmd.exe line that
Windows PowerShell 5.1 and cmd.exe both parse. doctor codex flags a hook
without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Invoke-Expression and iex, powershell -EncodedCommand (decoded and judged) and
Start-Process with its aliases are read as the commands they run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A segment is also judged with the backslashes a POSIX shell drops removed, so
git pu\sh and n\pm publish match; Windows paths keep matching as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each integration's installer, config file, markers and own health rule sit in
one row; single-hook installers share one install step; the matcher names the
two ways a line runs further commands. No behaviour change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0.17.0: Antigravity, Droid and Qwen Code targets, PowerShell coverage, and finish lines in compound shell commands

See merge request rene/skillgate!4
@renezander030
renezander030 merged commit ae4583b into master Nov 30, 2026
7 checks passed
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