Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

stopbar

Latest version: v1.2.2

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
npm package Publisher: polszewski-oq
0 Stars
0 Forks
9 Versions
1.0K Downloads
TypeScript Repo language

Scan summary

stopbar was last scanned on 27 Nov 2026 at version 1.2.2. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 9 versions; the latest 5 were published within 2 days (26 and 27 Nov 2026).
  • Findings: No rules fired in version 1.2.2.
  • Downloads: 1,016 downloads.

Versions

9 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.2.2 LATEST 27 Nov 2026 No rules fired
1.2.1 27 Nov 2026 No rules fired
1.2.0 26 Nov 2026 No rules fired
1.1.3 26 Nov 2026 Not shown
1.1.2 26 Nov 2026 Not shown

No rules fired in 1.2.2

Findings

Findings for v1.2.2. 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 score describes 1.2.2; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

Stopbar

CI npm

Stopbar is an execution gate for AI coding agents in three parts: a formally proven decision kernel (src/kernel.ts, about 160 lines, its laws proven by induction and checked again by lake build in Lean 4.34.0), a tested wrapper around it (the hooks of Claude Code, Cursor, Codex CLI, Gemini CLI and Antigravity CLI, and git hooks for any other tool), and an attestation of the session (stopbar attest). The wrapper reads tool calls and command text and asks the kernel; it is covered by unit and E2E tests and stateful probing, not by the proof.

Proven (Lean 4.34.0) Tested (wrapper + E2E + PROBE) Not covered without OS sandbox
The decision rule src/kernel.ts: no commit without a passing build and full suite at the current revision (L1); test taint until a human approval (L2.x); pause of risky and outbound calls after a secret read (L3.x); halt on budget and retries (L4.x). 10 mutants each fall with a counterexample. How tool calls become kernel requests: exact gate commands, content snapshots of the tree, test and secret path patterns, self-protection of .git, agent settings, Husky and Lefthook hooks and the Stopbar code, the client adapters, the git hooks. A path or name built at run time (f=.e; cat ${f}nv), a script the agent wrote and runs (node /tmp/x.js), code that the gate commands run, secrets in files with ordinary names. See SECURITY.md section 3.

Without an OS sandbox, Stopbar stops shortcuts and mistakes of an agent; it is not a security boundary against a hostile agent. A command can build a path at run time or hide it in a script that the text rules do not see. See SECURITY.md for what is proven, what the wrapper enforces and what needs an OS sandbox.

It stops an agent from:

  • committing without a passing build and a passing full test suite at the current revision of the working tree;
  • weakening existing tests or test configuration without a human approval;
  • running risky or outbound commands after it read a secret, unless a human allows one call;
  • looping on failing builds or tests, or going past a budget of tool calls;
  • switching itself off by editing the agent's hook configuration, git hooks or its own state.

Supported agents

Every client goes through the same rule: an adapter translates the client's hook payload into one internal event and renders the decision in the client's own output format.

Agent Config written by init --hooks Events Block protocol Status
Claude Code claude: .claude/settings.local.json (claude-project: .claude/settings.json) PreToolUse, PostToolUse, PostToolUseFailure, Stop exit 2, reason on stderr live-verified (Claude Code 2.1.326)
Cursor cursor: .cursor/hooks.json (failClosed: true) preToolUse, postToolUse, postToolUseFailure, stop (also beforeShellExecution, beforeMCPExecution, beforeReadFile, afterFileEdit, afterShellExecution) exit 2 and {"permission": "deny"}; stop: followup_message spec-tested (Cursor hooks reference)
Codex CLI codex: .codex/hooks.json PreToolUse, PostToolUse, Stop hookSpecificOutput.permissionDecision: "deny"; stop: decision: "block" live-verified (Codex CLI 0.172.0): denied commit and config write, tree changes, Stop. Run the gates as stopbar run build / stopbar run test (the hint uses --cli, default npx --no-install stopbar), because Codex reports no exit status to hooks. Codex loads project hooks only in a trusted folder
Gemini CLI gemini: .gemini/settings.json BeforeTool, AfterTool, AfterAgent exit 2, reason on stderr; AfterAgent: decision: "block" spec-tested (Gemini CLI hooks reference)
Antigravity CLI antigravity (alias agy): .agents/hooks.json PreToolUse, PostToolUse, Stop {"decision": "deny"}; stop: decision: "continue" live-verified (Antigravity CLI 1.5.18): denied early commit and config write, build and full tests recorded, honest commit allowed, Stop
Any tool, via git git: .git/hooks/pre-commit, .git/hooks/pre-push commit, push exit 1 aborts git tested with real git (E2E)

live-verified means a live agent session passed through the hooks; spec-tested means the adapter follows the client's published hook schema and the E2E suite runs it with payloads in that schema. Combine targets in one call: --hooks claude,cursor,codex,gemini,antigravity,git.

stopbar hook --adapter auto (the default) detects the client from the payload, so the v1.0 Claude Code settings keep working. An unknown or damaged payload fails closed (exit 2). The configs written by init pass --adapter explicitly.

Git fallback. For a tool without hooks, run the gates through Stopbar so their real exit status counts: stopbar run build and stopbar run test. The git hooks then allow a commit only after both passed at the current tree, block it after an unapproved test change, and block a push after a secret read without approval.

Set up in 3 steps

Requirements: Node.js 22.18 or later, git, a git repository.

  1. Install Stopbar in the repository (or globally):

    npm install --save-dev stopbar
  2. Initialise with your exact build and full-test commands, and write the hooks of your agents:

    npx stopbar init --build "npm run build" --test "npm test" --hooks claude,cursor,git

    Profiles for the path patterns: --profile default|ts|python|strict. init copies the runtime to .git/stopbar/runtime/ and points every hook to it. Existing settings and hooks in those files stay; earlier Stopbar entries are replaced. Since 1.2.0, --hooks <clients> also writes the git hooks (pre-commit, pre-push): they close git aliases, and before a push merge, cherry-pick, am and commit-tree, which an agent hook does not see. Pass --no-git-hooks to skip them. init does not overwrite a git hook it did not write: when the git hooks were added by default, it keeps the foreign hook and prints a WARN; when you named git in --hooks, it stops with an error. --hooks git --force-hooks replaces it (the old hook is kept as <name>.stopbar-backup). Without --hooks, init writes nothing outside .git/stopbar/ and prints the Claude Code JSON to paste. A template is in claude-hooks.example.json.

  3. Check the setup, then restart the agent in the repository:

    npx stopbar doctor

    doctor checks Node, git, the kernel link, config.json, state.json, the event log and the hooks of every client it finds, and makes a dry run of the real hook pipeline on a scratch repository.

The agent must run the gate commands exactly as configured, alone and in the foreground, for example npm test and not npm test | tail or with run_in_background. For long-running gates (>10 min), run stopbar run build / stopbar run test (safe to run in the background: Stopbar records the real exit status only when the process finishes, and discards the result if the working tree changed in the meantime). The hints that Stopbar shows the agent name this command as npx --no-install stopbar run build|test: --no-install uses an installed Stopbar and never downloads the package from the npm registry. If Stopbar is installed elsewhere (a global install or a checkout outside the project), set the command with stopbar init --cli "<cmd>", for example --cli "node /opt/stopbar/bin/stopbar.mjs"; the hints then say node /opt/stopbar/bin/stopbar.mjs run test. Commits must be one command. The quoted heredoc form that agents use is allowed:

git commit -m "$(cat <<'EOF'
Fix the parser

Reviewed-by: Jane Doe <jane@example.invalid>
EOF
)"

Commands

OX Radar and Response Center

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.

Where it’s listed

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).

  • npm stopbar

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229