Open source moderation for GitHub.
Tripwire watches your repos for low-signal activity (spammy issues, drive-by PRs, suspicious accounts, etc.) and lets you flag, filter, or block it with a configurable rules system. You install it as a GitHub App, point it at your repos, and enable rules.
Clone:
git clone https://github.com/Boring-Software-Inc/tripwire.git
cd tripwire
pnpm installCopy the example env file and fill it in:
cp .env.example .envThe required vars:
BETTER_AUTH_URL— your local URL, usuallyhttp://localhost:3000BETTER_AUTH_SECRET— generate withopenssl rand -hex 32GITHUB_CLIENT_ID/GITHUB_CLIENT_SECRET— from your GitHub OAuth AppGITHUB_APP_ID/GITHUB_APP_PRIVATE_KEY/GITHUB_WEBHOOK_SECRET— from your GitHub AppVITE_GITHUB_APP_SLUG— the slug fromgithub.com/apps/{slug}DATABASE_URL— Postgres connection string
GitHub App setup:
- Webhook URL:
{BETTER_AUTH_URL}/api/github/webhookin production, or your ngrok URL plus/api/github/webhookin local dev - Webhook secret: same value as
GITHUB_WEBHOOK_SECRET - Permissions:
Metadata: read,Contents: write,Issues: write,Pull requests: write - Subscribe to events:
Installation,Installation repositories,Issues,Issue comment,Pull request,Push,Release
Optional:
UNKEY_ROOT_KEY— rate limiting (allows all requests if unset)AUTUMN_SECRET_KEY— billingAXIOM_TOKEN,AXIOM_DATASET,AXIOM_TRACES_DATASET— logs and tracesOTEL_EXPORTER_OTLP_ENDPOINT— OpenTelemetry endpoint, defaults to AxiomINNGEST_EVENT_KEY/INNGEST_SIGNING_KEY— durable background jobs (used by the research harness; in dev, runnpx inngest-cli devinstead)INNGEST_ENV— required if your Inngest keys belong to a branch environment (otherwise you'll see "400 Branch environment name is required"); leave unset for productionRESEARCH_GH_TOKEN— PAT withpublic_reposcope for the admin research eval harness; lets it read PR data from any public repo without requiring the GH App to be installed
Push tables to db:
pnpm db:pushStart the dev server:
pnpm devOpen http://localhost:3000.
pnpm dev— run the apppnpm build— build for productionpnpm test— run testspnpm typecheck— typecheckpnpm db:studio— open Drizzle Studio
MIT.
