Tier 1 Verifier in the gitbot-fleet ecosystem. Enforces Rhodium Standard Repository (RSR) compliance across hyperpolymath repositories via GitHub webhooks.
Rhodibot is a GitHub App that validates repositories against RSR structural requirements. It runs as an HTTP service, receives webhook events (push, pull request, repository creation, installation), and reports compliance via GitHub Check Runs. When a new repository is created, it automatically opens an issue with an RSR compliance checklist.
Rhodibot is written in Rust (2151 LOC across 8 modules), uses Axum for the web framework, and integrates with the gitbot-fleet shared context layer so that downstream bots (glambot, seambot, finishbot, robot-repo-automaton) can consume its findings.
-
RSR compliance checking with 5 configurable policy packs (Minimal, Standard, Strict, Enterprise, Custom)
-
14 file presence checks across documentation, security, governance, and structure categories
-
6 banned file pattern checks enforcing the CCCP language policy (npm, yarn, pnpm, bun, Go)
-
Workflow validation for required CI/CD workflows (hypatia-scan, codeql, scorecard)
-
Author attribution validation detecting incorrect
authorsfields in Cargo.toml -
License type validation against an approved license list (PMPL, MIT, Apache-2.0, MPL-2.0)
-
Per-repo configuration via
.rsr.tomlwith severity overrides and skip lists -
Check run creation on pushes and pull requests with detailed markdown reports
-
RSR checklist issue creation for newly created repositories
-
Fleet integration converting findings to
Findingstructs for the gitbot-fleet shared context -
Security hardening with input sanitization, path traversal prevention, and HMAC constant-time comparison
69 tests total:
-
21 unit tests in
src/sanitize.rs(GitHub name validation, file path validation, markdown sanitization) -
48 integration tests in
tests/integration_tests.rscovering RSR engine, webhooks, GitHub client, fleet integration, and report formatting -
All tests use wiremock for GitHub API mocking (no real API calls)
| Module | Purpose |
|---|---|
|
Axum HTTP server, CLI argument parsing, route registration |
|
Application configuration (GitHub App ID, private key, webhook secret, API URL) |
|
RSR compliance engine with policy packs, file checks, banned patterns, scoring |
|
GitHub webhook handlers (push, PR, repository, installation, ping), HMAC-SHA256 verification |
|
GitHub API client (file existence, content retrieval, check runs, issues) |
|
Input validation for GitHub names, file paths, and markdown output |
|
gitbot-fleet integration: converts compliance reports to |
|
Library root, re-exports all modules |
Each RSR check has a severity (Required, Recommended, Optional) that varies by policy pack:
| Check | Minimal | Standard | Strict | Enterprise |
|---|---|---|---|---|
README.adoc |
Required |
Required |
Required |
Required |
LICENSE.txt |
Required |
Required |
Required |
Required |
SECURITY.md |
Optional |
Recommended |
Required |
Required |
CONTRIBUTING.md |
Optional |
Recommended |
Required |
Required |
CODE_OF_CONDUCT.md |
Optional |
Optional |
Recommended |
Required |
.claude/CLAUDE.md |
Optional |
Optional |
Recommended |
Required |
STATE.scm |
Optional |
Recommended |
Required |
Required |
META.scm |
Optional |
Recommended |
Required |
Required |
ECOSYSTEM.scm |
Optional |
Optional |
Recommended |
Required |
.editorconfig |
Optional |
Recommended |
Required |
Required |
.gitattributes |
Optional |
Recommended |
Required |
Required |
.gitignore |
Optional |
Recommended |
Required |
Required |
justfile |
Optional |
Optional |
Recommended |
Required |
.bot_directives |
Optional |
Optional |
Recommended |
Required |
Repositories can override severity or skip checks entirely via .rsr.toml:
policy = "strict"
[severity_overrides]
"CODE_OF_CONDUCT.md" = "optional"
skip = ["ECOSYSTEM.scm"]# Set required environment variables
export GITHUB_TOKEN=ghp_...
export GITHUB_WEBHOOK_SECRET=your-webhook-secret
# Optional: GitHub App mode (JWT auth not yet implemented)
export GITHUB_APP_ID=123456
export GITHUB_PRIVATE_KEY_PATH=/path/to/private-key.pem
# Start the server
rhodibot --port 3000| Method | Path | Description |
|---|---|---|
GET |
|
Health check (returns JSON with status, version, name) |
GET |
|
Health check (same as |
POST |
|
GitHub webhook receiver (validates HMAC-SHA256 signature) |
GET |
|
Manual compliance check (returns JSON report) |
Usage: rhodibot [OPTIONS]
Options:
-p, --port <PORT> Port to listen on [env: PORT=] [default: 3000]
--app-id <APP_ID> GitHub App ID [env: GITHUB_APP_ID=]
--private-key-path <PATH> Path to GitHub App private key [env: GITHUB_PRIVATE_KEY_PATH=]
--webhook-secret <SECRET> Webhook secret for verification [env: GITHUB_WEBHOOK_SECRET=]
-h, --help Print help
-V, --version Print version| File | Category | Points |
|---|---|---|
README.adoc |
Documentation |
5 |
LICENSE.txt |
Governance |
5 |
SECURITY.md |
Security |
5 |
CONTRIBUTING.md |
Documentation |
3 |
CODE_OF_CONDUCT.md |
Governance |
3 |
.claude/CLAUDE.md |
Structure |
2 |
STATE.scm |
Structure |
3 |
META.scm |
Structure |
3 |
ECOSYSTEM.scm |
Structure |
3 |
.editorconfig |
Structure |
2 |
.gitattributes |
Structure |
2 |
.gitignore |
Structure |
2 |
justfile |
Structure |
2 |
.bot_directives |
Structure |
2 |
| File | Violation |
|---|---|
package-lock.json |
npm lock file (use Deno) |
yarn.lock |
Yarn lock file (use Deno) |
pnpm-lock.yaml |
pnpm lock file (use Deno) |
bun.lockb |
Bun lock file (use Deno) |
go.mod |
Go module (use Rust) |
go.sum |
Go checksum (use Rust) |
-
Workflow presence —
.github/workflows/directory -
Required workflows —
hypatia-scan.yml,codeql.yml,scorecard.yml(severity varies by policy) -
Author attribution — flags Cargo.toml using "hyperpolymath" as author
-
License type — validates against approved license list
Rhodibot applies defense-in-depth security measures:
-
Webhook signature verification uses HMAC-SHA256 with constant-time comparison (via the
hmaccrate’sverify_slice, backed bysubtle::ConstantTimeEq) -
Input validation for GitHub owner/repo names from webhook payloads (rejects special characters, empty strings, consecutive hyphens)
-
Path traversal prevention for all GitHub content API calls (rejects
.., absolute paths, null bytes) -
Markdown output sanitization escapes HTML tags, markdown links, and code block delimiters in user-controlled content
-
Token handling —
GITHUB_TOKENis passed only tobearer_auth()and never logged or serialized
cargo test69 tests: 21 unit tests (sanitize module) and 48 integration tests (RSR engine, webhooks, GitHub client, fleet, reports).
Rhodibot is a Tier 1 Verifier in the gitbot-fleet hierarchy:
| Bot | Role | Relationship to Rhodibot |
|---|---|---|
Tier 1 Verifier |
Sibling (mathematical/formal verification) |
|
Tier 1 Verifier |
Sibling (ecological/economic standards) |
|
glambot |
Tier 2 |
Downstream consumer (presentation quality) |
seambot |
Tier 2 |
Downstream consumer (integration testing) |
finishbot |
Tier 2 |
Downstream consumer (release readiness) |
Executor |
Acts on rhodibot RSR findings to auto-fix repos |
|
Coordinator |
Parent: provides shared context layer |
|
Engine |
Neurosymbolic CI/CD intelligence platform |
-
GitHub only — multi-forge support (GitLab, Codeberg, Bitbucket) not implemented
-
GITHUB_TOKEN auth only — GitHub App JWT authentication is not yet implemented (app_id and private_key are accepted but unused)
-
SPDX header validation not yet implemented (checks file presence only, not header content)
-
Workflow SHA-pin validation not yet implemented
-
Fleet CLI subcommand not yet wired into main.rs (fleet integration is available as a library)
PMPL-1.0-or-later. See LICENSE for details.