Scan your whole stack
From OX Research Newsroom
Latest version: v0.3.1
io.github.safelatch-dev/safelatch was last scanned on 3 Dec 2026 at version 0.3.1. Risk score 5 of 100 (low). No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.3.1 LATEST | 3 Dec 2026 | 2 rules fired |
| 0.3.0 | 3 Dec 2026 | 2 rules fired |
| 0.2.1 | 1 Dec 2026 | 1 rule fired |
Findings for v0.3.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The code decodes or decrypts a string and executes code built from it, for example eval(atob(...)) or exec(base64.b64decode(...)). This is a common way to hide code from review. On its own it is not evidence of malicious behavior.
MEDIUMThe score describes 0.3.1; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
safelatch)Snapshot and undo supported shell file changes. Audit local plugin and MCP configuration across Antigravity, Claude Code, and Cursor.
| Host | SafeLatch support |
|---|---|
| Antigravity | Shell rewind, runtime guard, and offline audit |
| Claude Code | Shell and structured edit snapshots, runtime guard, and offline audit |
| Cursor | Shell snapshots and runtime guard, plus offline audit |
Already using cc-safety-net? See how the two tools can coexist.
English | 简体中文 | Tool Comparisons
1. Run the local audit without installing hooks. The first npm invocation may download the package.
npx -y safelatch@0.3.1 audit --workspace .
2. Install the Antigravity plugin for shell rewind and the runtime guard.
# Antigravity CLI
agy plugin install https://github.com/safelatch-dev/safelatch
# Antigravity Desktop / Node.js (also auto-migrates legacy `agy-guard` hooks)
npx -y safelatch@0.3.1 install
3. Optional: Register runtime snapshot & guard hooks for Claude Code or Cursor (preserves existing hooks such as cc-safety-net):
npx -y safelatch@0.3.1 install --host claude-code
npx -y safelatch@0.3.1 install --host cursor
# Or register Antigravity + Claude Code + Cursor together:
npx -y safelatch@0.3.1 install --host all
Use npx -y safelatch@0.3.1 uninstall --host <host> to remove only SafeLatch's hook entries. Claude Code (Bash, Write, Edit, MultiEdit, NotebookEdit) and Cursor (beforeShellExecution, beforeMCPExecution) share the local snapshot store (safelatch snapshots / diff / restore). Cursor handles approval in the selected permission mode and inspects local MCP launcher metadata when present; general MCP calls lack file targets for rewind.
Offline audit benchmark and reproduction instructions
Pure runtime command blockers (cc-safety-net) stop rm -rf, yet cannot recover files corrupted by shell tools once allowed. Native Antigravity /rewind rolls back structured edit_file calls, yet misses direct shell edits (google-antigravity#851). And plugin.json manifests do not declare which hooks, scripts, or remote MCP URLs a community plugin actually runs (arXiv:2609.23809).
The SafeLatch runtime uses zero runtime dependencies, zero network calls, and zero subprocess calls.
audit)The scanner reads recognized plugin, hook, MCP, rule, and skill files locally. Unresolved script entries appear as coverage notes.
~/.gemini/config, .agents/), Claude Code (~/.claude, CLAUDE_CONFIG_DIR, ~/.claude.json, .claude/, .mcp.json), and Cursor (~/.cursor, .cursor/, .cursorrules) config paths directly without walking editor extension caches.scripts/hook.mjs → dist/hook.mjs).A004: Standard https:// MCP endpoints receive 0 score penalty while still appearing in your Capabilities X-Ray; only plaintext http:///ws://, raw IPs, ephemeral tunnels (ngrok, trycloudflare.com), and unpinned npx -y / @latest runners are flagged.--sarif): The composite action supports optional SARIF upload. Private repositories need GitHub Code Security enabled to upload. Give each scan a distinct sarif-category when uploading multiple scans from one workflow.- uses: safelatch-dev/safelatch@v0.3.1
with:
path: "."
fail-on: "high"
upload-sarif: "true" # requires security-events: write
CI and Git hook recipes cover GitHub Actions, GitLab CI, and staged-file checks before commit.
snapshots / diff / restore)Antigravity’s native /rewind misses shell edits. Before supported tool calls execute, SafeLatch attempts to snapshot recognized workspace files within local storage limits.
write_file, edit_file, mcp_agy-fast_fast_apply_edits (both edited hunks AND verify shell targets).>, >>, 1>, &>, *>), GNU & macOS BSD sed -i, case-sensitive perl -i, tee, cp / Copy-Item, PowerShell Set-Content / Add-Content / Out-File, rm / Remove-Item / del, mv / Move-Item, git checkout / restore, and mcp_agy-fast_fast_run_checks batches.existed: false). Restore removes the recorded file after verifying a safety backup. If a file path has become a directory, restore stops by default.safelatch restore <id> --dry-run. Applying changes requires --yes. Use --force only after inspecting a backup or file-type conflict.PreToolUse)G004, deny): Non-downgradable protection prevents runaway agents from running agy plugin disable safelatch, safelatch uninstall, or deleting/overwriting installed ~/.gemini/config/plugins/safelatch, ~/.safelatch/config.json, or .agents/safelatch.json files (including $GEMINI_HOME / $PLUGIN_ROOT / $PLUGIN_DATA token expansion).sh -c, bash -c, cmd /c, powershell -Command, Base64 -EncodedCommand, $() substitutions, and Windows PowerShell Remove-Item -Recurse -Force / irm ... | iex pipelines.passDecision: "ask"): In Antigravity's PreToolUse protocol, returning {} is treated as a hard deny. SafeLatch defaults unflagged calls to "decision": "ask" so your native "Always Allow" permission flow keeps working untouched (see Hook Protocol Notes).| Capability | Antigravity Sandbox + /rewind |
cc-safety-net |
Static Skill Scanners | SafeLatch (v0.3.1) |
|---|---|---|---|---|
| Offline capability audit and SARIF 2.1.0 | — | — | Partial | Yes |
Shell-aware file rewind (sed -i, >, tee, Set-Content) |
Misses shell (#851) |
— | — | Yes |
Cross-shell (sh / cmd / PowerShell) + G004 self-defense |
Native hooks | Yes | — | Yes |
Preserves native Always Allow + Zero deps / Zero network |
Built-in | Partial | Varies | Yes |
See COMPARISONS.md for architecture trade-offs and guidance on running SafeLatch alongside cc-safety-net or Antigravity Strict Mode.
src/ and dist/ contain zero runtime dependencies and zero network/subprocess imports.| Rule ID | Default Decision | Scope |
|---|---|---|
G001 |
deny (non-overridable by workspace) |
Recursive delete targeting /, ~, system dirs, drive root, or workspace root |
G002 |
deny (non-overridable) |
Raw disk formatting (mkfs*, diskpart, format X:, dd of=/dev/*) |
G003 |
deny (non-overridable) |
Shell fork bomb patterns |
G004 |
deny (non-overridable) |
Self-tampering: agy plugin disable safelatch, safelatch uninstall, or mutating guard plugin/config files |
G101 |
force_ask |
Destructive Git ops (reset --hard, clean -f, push --force without lease, checkout ., branch -D main) |
G102 |
force_ask |
Remote download piped into shell/evaluator (curl \| sh, irm \| iex, process substitution) |
G103 |
force_ask |
Command accesses credentials (.env, .ssh, .aws, .npmrc) or general .agents/hooks.json configs |
G104 |
force_ask |
Overly permissive chmod -R 777 / a+rwx |
G105 |
force_ask |
Scoped recursive delete inside workspace |
G106 |
force_ask |
File write/edit targets sensitive file or path outside workspace/artifact roots |
G107 |
force_ask |
Nested shell command exceeds the inspection depth |
| Rule ID | Severity | What It Detects |
|---|---|---|
A001 |
critical |
Remote download piped into shell or eval inside hooks/scripts |
A002 |
critical |
Obfuscated base64 / -EncodedCommand / atob execution |
A003 |
high |
Hardcoded local credential or SSH key paths |
A004 |
high / medium |
Plaintext remote http:///ws:// (high), raw IP or ephemeral tunnel (medium), or unpinned npx -y/@latest/uvx (medium). Standard https:// gets 0 penalty. |
A005 |
high |
Hardcoded GitHub/OpenAI/AWS/Google/Slack/npm tokens or PEM keys |
A006 |
high |
Prompt-injection overrides or hidden zero-width/bidi Unicode in rules/skills |
A007 |
high |
Static PreToolUse hook hardcoding "decision": "allow" without checks |
A008 |
medium / low |
Bundled native binaries (.exe/.dll/ELF/Mach-O) or >1 MB unreadable scripts |
A009 |
info |
Missing LICENSE or repository provenance metadata on standalone plugins |
# 1. Security & Capability X-Ray
safelatch audit [--path <file-or-dir>] [--workspace <dir>] [--json|--md|--sarif] [--fail-on <severity>]
# 2. Shell-Aware Snapshots & Rewind
safelatch snapshots [--workspace <dir>] [--json]
safelatch diff <snapshot-id> [--workspace <dir>]
safelatch restore <snapshot-id> [--file <rel>] [--dry-run] [--yes] [--force]
# 3. Guard Dry-Run & Plugin Management
safelatch check "<command>" [--json]
safelatch install [--config <dir>] [--skip-enable]
safelatch uninstall [--config <dir>]
safelatch status
safelatch_guard): safelatch_audit, safelatch_snapshots, safelatch_diff, safelatch_check (legacy agy_guard_* tool calls remain supported as aliases).$PLUGIN_DATA/config.json or ~/.safelatch/config.json, fallback ~/.agy-guard/config.json) → Workspace (.agents/safelatch.json, fallback .agents/agy-guard.json). Workspace configs cannot set mode: "off", mode: "monitor", passDecision: "allow", or snapshot.enabled: false. Only an explicit global ask-only can downgrade G001–G004 to confirmation.Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.