All plugins

ajax

Offline security review of staged Git changes or pinned commit ranges, with two read-only stdio MCP tools and a review skill.

mevarxToolsv0.1.0Updated 1 day ago

Ajax

Ajax is an offline Go security gate for exact Git changes. It reviews either the staged index or two pinned commit objects. The same gate is available as a CLI and through a read-only stdio MCP server.

Security

See SECURITY.md for the review boundary, build guidance, and private reporting instructions.

Run locally

Requirements: Go 1.26 or newer to build and Git on PATH at runtime. Use a current patched Go toolchain; v0.1.0 was checked with Go 1.26.11. The v0.1.0 release is source-only.

go install github.com/mevarx/ajax/cmd/ajax@v0.1.0
ajax version

To use the vendored dependencies instead, run go install -mod=vendor ./cmd/ajax from the tagged source checkout.

Check the installed version with ajax version. From the intended Git working tree, ajax doctor reports whether snapshot capture works; it does not scan for findings or test a host connection.

For a focused advisory swarm, ajax swarm --staged --focus=actions-write-all prepares separate workflow- and job-level packets for overly broad GitHub Actions permissions. See the native Hermes smoke test and handoff. The deterministic gate does not depend on agent replies.

Run from the Git working tree to review. On Windows the executable is ajax.exe.

ajax gate --staged
ajax gate --staged --format json
ajax gate --base "$BASE_SHA" --head "$HEAD_SHA" --format sarif

Commit IDs must be full lowercase hashes of local commit objects. Range review requires a non-shallow repository and checks commit messages reachable from head but not base. It compares file contents at the two endpoints; it does not scan intermediate file versions. For optional pre-commit feedback, call ajax gate --staged from an existing hook and propagate its exit status; Ajax does not install hooks. Local hooks can be bypassed. See the CI guide for the trusted-base workflow and repository settings needed for enforcement.

Exit codeMeaning
0pass: required checks completed without blocking findings.
1blocked: a required check recorded one or more blocking findings.
2incomplete or invalid invocation: required coverage or input was missing. Already recorded findings remain visible.

What it checks

  • Secrets: Newly added GitHub token-shaped text in file contents, file names, and range-review commit messages, plus PEM private-key blocks, including common PKCS#8, RSA, EC, DSA and OpenSSH forms. Ajax compares occurrences per path against the baseline: unchanged private keys are not reported as new, but replacements are. Public keys and certificates are not matched. Reports give the location, not the key or token. Private-key detection covers standalone PEM blocks; escaped keys embedded in strings are not currently checked. No credential verification is performed.
  • Go dependencies: go.mod hygiene and go.sum structure. Changed dependency manifests require an operator-trusted advisory snapshot for exact-version matching. This is not a reachable-code, full dependency-graph, or toolchain scan.
  • GitHub Actions and agent configuration: Reviews supported changed manifests for rules such as unpinned external actions, wide workflow permissions, shell-backed MCP launchers, and broad agent permissions. Config rules evaluate the whole changed file, including inherited settings. A rename is a deletion plus addition.

Ajax reads Git objects without checking out or running candidate code. Four workers run static checks in parallel. Unsupported content, budget limits and parse failures become explicit coverage gaps. A complete result is not a claim that the repository is secure. Output supports text, JSON and SARIF 2.1.0; JSON retains excepted findings, while SARIF exports blocking findings and coverage status.

Trusted inputs

Only pass files controlled by a maintainer or operator, never a file from an untrusted candidate. Ajax does not auto-discover these inputs in the CLI. The CI wrapper takes .ajax/trusted-policy.json and .ajax/advisories.json from the trusted base checkout, if present.

ajax gate --staged --policy /trusted/ajax-policy.json --advisories /trusted/advisories.json

An exception matches one exact rule and repository-relative path, needs an owner and reason, and expires at an RFC 3339 timestamp. It preserves the finding and cannot waive missing coverage. Example policy (replace the sample expiration and values):

{"schema_version":1,"exceptions":[{"rule":"secrets.github-token-format","path":"testdata/demo.txt","owner":"security","reason":"Synthetic fixture only","expires":"2027-01-01T00:00:00Z"}]}

Example advisory format (schema illustration only; not a real advisory feed):

{"schema_version":1,"expires":"2027-01-01T00:00:00Z","entries":[{"module":"example.org/module","version":"v1.2.3"}]}

The publisher is responsible for freshness, completeness, veracity and expanding any version ranges into exact records. Ajax does not fetch or authenticate advisory data. If no valid feed is available for changed Go manifests, the verdict is incomplete, not a clean advisory result.

Agent harnesses

Run ajax mcp from the review repository, or set AJAX_WORKSPACE to that repository in the server’s launch environment. The server exposes only review_staged and review_range; the client cannot supply a path, execute a command, mutate Git, or override policy. See plugin packaging and host status for Hermes, Claude Code, Codex, Cursor, Antigravity, and Devin.

Optional loopback AI review

Ajax can run three independent, tool-free model specialists in parallel: authorization, sensitive-data handling, and workflow/agent permissions. They review excerpts from the exact Git snapshot, not the working tree. They return proposed review locations that Ajax validates against the evidence it sent. Findings are advisory; AI never affects ajax gate or GitHub CI.

Start a trusted local model server with an OpenAI-compatible chat-completions API and substitute an installed model name. Example for a server listening on port 11434:

ajax ai-review --staged --endpoint http://127.0.0.1:11434/v1/chat/completions --model YOUR_LOCAL_MODEL

--base FULL_SHA --head FULL_SHA is also supported. The advisory command returns 0 for a completed run, even with suggestions, and 2 for a partial or failed run. Check per-worker status and omitted files; no findings does not prove safety.

For a harness integration, have the operator add --endpoint http://127.0.0.1:11434/v1/chat/completions --model YOUR_LOCAL_MODEL to the existing ajax mcp launch arguments. The same review tools then include a separate ai_review field. Do not enable this for untrusted fork automation. The packaged defaults keep AI off.

Only literal loopback addresses are supported; Ajax does not use proxies or follow redirects. Use a model server you control that doesn't forward requests, log sensitive data, or run tools. Excerpts are size-limited and redact known credential shapes and every line containing a sensitive keyword, but redaction is not exhaustive. Only opt in for code you are authorized to send to that server. Ajax does not spawn native harness agents or install a model server.

Development

go test ./...
go vet ./...
go build ./...
bash scripts/ci/tests/run-tests.sh

Licensed under Apache-2.0. Vendored dependencies retain upstream license notices.

README from the reviewed commit 31db908; it updates when the author re-pins.

More by mevarx

2 plugins by mevarx in the catalog.

Developer Mode

Explore built-in Hermes toolsets and actions.

HermesAgent

Developer?

Create a Hermes extension for Desktop or agent workflows.

Developer Section