Repository navigation
v0.3.0
MVP release: closes every failing case from the v0.2.0 review (adversarial suite: 0 todo).
Added
test/adversarial.test.ts: the review's 39-check attack simulation, with mocked network. Open attacks aretodountil fixed.publish --to-dir <dir>writes the signed files into a local registry copy instead of opening a PR.
Release
releaseworkflow onv*tags: tests,npm pack,SHA256SUMS, build-provenance attestation, GitHub Release with assets, andnpm publish --provenancewhenNPM_TOKENis set. Tags are GPG-signed; the public key is in.github/release-signing-key.asc. See RELEASING.md.
Docs and governance
docs/: quickstart, how it works, threat model, spec, API, platforms, consumers, keys, FAQ. New README, SECURITY.md, CODEOWNERS, Dependabot (npm + actions). All actions are pinned by commit SHA.- Badges show the proof label (
✓ challenge-passed,✓ verified creator); the score stays in the API.
For consumers
- GitHub Action (
uses: ao3575911/botproof@v0.3.0): inputsbot,min-strength,registry,trust; outputsstrength,score,hash; fails the job below the threshold. verify --min-strength <s>exits 3 below it. Exit codes are documented in--help.
Trust
- Reviews from GitHub accounts under 90 days old, or with no repos and no followers, count 0 (review A6). Creator GitHub links weigh by account age: 50 (1y+), 35 (90 days+), 15 (new or unknown).
verify --trust <handles|file>counts only reviews from your own list.
Registry API
api/index.jsonaddsschemaVersion,registryCommitand a sha256 for every signed document.verifychecks the bot's documents against those hashes and prints the commit.verify --gitchecks a bot from a fresh clone of the registry, without trusting the API.- Each URL is fetched once per Pages build.
Security
-
Challenge codes are bound to the bot and the creator's key:
botproof-challenge:<platform>/<botId>:<keyId>:<nonce>. A copied code no longer passes for another bot or key (review A2, N2). -
webchallenges must be on the creator's own gist or a DNS-proven domain. Onlygrokandwebplatforms are accepted. -
registry checkrejects a challenge nonce used by another bot or key. -
First-come bot ownership:
registry check --base <ref> --author <login>rejects a PR that changes another creator's bot, deletes signed files, or carries signatures from anyone but the PR author (review A3). -
Anti-rollback: manifests carry a monotonic
seq(set bysign). CI requires it to increase, andverifyrejects a manifest older than any signed version inversions/(review A7). -
Reviews carry the
versionHashthey reviewed. Reviews of earlier versions are shown but not counted, so a takeover can't inherit them (review A3). -
Key lifecycle:
revoke --key [--since]voids everything the key signs from then on, and CI rejects new signatures from a revoked key (review A8).rotatemoves to a new key with a rotation doc signed by both keys, and your bots stay yours.keyshows your key;key exportprints it for backup. -
Keys are stored encrypted by default (PKCS#8, AES-256-CBC, mode 0600). The passphrase is prompted, or read from
BOTPROOF_PASSPHRASE. Existing plaintext keys still load. -
Web Bot Auth evidence counts only from allowlisted platform directories (built in: chatgpt.com; the registry's
platforms.jsonextends it by PR). The request path must contain the bound challenge code, and evidence only upgrades a claim whose own challenge passed (review N6, N8). -
verifynever takes the platform allowlist from the API mirror. -
transfer <platform>/<botId> --to github:<user> --to-key <key>: the owner signs a hand-over before the new owner publishes. -
Grok share pages: only the title and description tags are read.
-
One rule set (
src/rules.ts) for CI andverify:verifynow rejects a tampered creator profile (A9) and a handle that doesn't match its proven GitHub account (A10b). -
platformmust begrokorweb; all HTML in the Pages index is escaped (A12c, stored XSS). -
Network reads are https only, with a 10 s timeout, a 2 MB cap and no redirects.
-
Canonical JSON follows RFC 8785 for strings and key order, and rejects non-integer or unsafe numbers.
Fixed
- Installing from git or a tarball builds the CLI (
preparescript), sobotproofexists after install (review H0). CI installs the packed tarball and runsbotproof --version. - A bad JSON file in the registry is reported by path, and the check fails closed (A12b).
- Evidence signed in the same second the code was issued is accepted.
init --bot https://x.ai/bot/<id>works without--platform, as the README shows.