nazarli-shabnam/clevis
Acerca de
Self-hosted GitHub security dashboard — tracks org security checks (MFA, branch protection, scanning) with score trends, plus automated Actions cache cleanup. FastAPI + Next.js + PostgreSQL.
Desarrollo web y de aplicacionesCrecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- -3
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
OriginalClevis
Analytics and security insight for GitHub repositories and organizations.
Clevis turns the GitHub API into a dashboard. Track repository activity, audit organization security posture, and run privileged maintenance jobs — from a single, dense, self-hosted control panel.
What it does
| Area | Description |
|---|---|
| Overview | At-a-glance stats across your repositories and organization. |
| Activity | Repository and org event streams pulled from the GitHub API. |
| Repositories | Browse and inspect repositories with their key signals in one place. |
| Health & Security | A computed security score backed by six core automated checks — MFA enforcement, branch protection, secret scanning, Dependabot alerts, code scanning alerts, and default-branch force-push protection — plus optional informational repo-hygiene checks (CODEOWNERS, SECURITY.md, license, stale branches, unpinned Actions) that count toward the score only when enabled. Each check has a pass, fail, error, or not_applicable status and remediation guidance. |
| Collaborators | See who has access across the surface you manage. |
| Automation | Run privileged maintenance jobs (e.g. clearing GitHub Actions caches) with dry-run support and a full audit trail. |
Every privileged action is recorded in an append-only audit log, and long-running work is dispatched to a background worker through a Postgres-backed job queue.
Architecture
Clevis is three independently deployable services around one shared check library:
| Component | Stack | Responsibility |
|---|---|---|
apps/api |
FastAPI · SQLAlchemy 2 · Alembic | REST backend — auth, analytics, RBAC, and job enqueueing. |
apps/worker |
Python · psycopg3 | Polls the job queue (SELECT … FOR UPDATE SKIP LOCKED) and executes GitHub API tasks. Safe to run as multiple replicas; to scale with Docker Compose, remove the fixed container_name: worker from docker-compose.yml first, then docker compose up --scale worker=N. |
apps/ui |
Next.js 15 · React 19 · TanStack Query | The dashboard — dense, dark, keyboard-friendly. |
packages/checks |
clevis-checks (Python) |
The security-check engine — six core checks (MFA, branch protection, secret scanning, Dependabot alerts, code scanning alerts, default-branch force-push protection) plus five optional repo-hygiene checks — with built-in GitHub pagination. |
Security model: Access is enforced per route with JWT auth dependencies (require_auth, require_workspace_admin) and org-scoped roles (require_org_role("member"|"admin")). GitHub credentials may be stored as Fernet-encrypted rows in saved_tokens (legacy PAT path); job payloads are also Fernet-encrypted at enqueue time and decrypted only when the worker processes them. Prefer a connected GitHub App installation so the API can mint short-lived installation tokens instead. Every request carries a propagated X-Request-ID for traceability.
Built with
Quickstart
Prerequisites: Docker + Docker Compose.
git clone https://github.com/nazarli-shabnam/clevis
cd clevis
cp .env.example .env # fill in the required variables (DB_USER, DB_PASSWORD, DB_NAME, REDIS_PASSWORD; JOB_SECRET_KEY and AUTH_SECRET are generated on first start unless you set them); the rest have defaults
docker compose -f docker-compose.yml -f docker-compose.local.yml up --build -d
Then open the UI at http://localhost:3000. The base docker-compose.yml publishes no host ports (a reverse proxy such as Traefik is expected to route to the containers), so the docker-compose.local.yml override is what makes the stack reachable on localhost; for a real deployment see Reaching the stack.
Full env var reference, GitHub App registration, and production hardening notes live in docs/self-hosting.md. Local dev without Docker is covered in AGENTS.md.
Get started
Once the instance is running, here's how to go from a fresh deploy to a connected GitHub org:
- Create the first account. The first visit lands on
/setup, which creates the initial admin. After that, sign in with a password or the "Sign in with GitHub" button. - Connect a GitHub org or account. Go to Settings → Connected GitHub accounts and click Install GitHub App — this sends you to GitHub to authorize Clevis for that org/account, which is what grants read access to its repos. GitHub redirects you back into the app once you approve it, and the org/account shows up under "Connected GitHub accounts" a few seconds later. (The App itself is a one-time setup step for whoever deployed the instance — see
docs/self-hosting.mdif that hasn't been done yet.) If you install into a brand-new org and the connection doesn't complete, sign out and back in with "Sign in with GitHub" once (this is what verifies your admin access on that org) and retry the install.
That's it — Overview, Activity, Repositories, Collaborators, Health & Security, and Cache all work off the connected org from step 2. A legacy personal access token (Settings → Personal access tokens (legacy)) is only ever needed as a manual fallback for an org that has no GitHub App installation — it is not a required step.
Pasting a PAT connects the org only if you're a GitHub admin of it. When a workspace admin saves a token whose read:org scope lets Clevis confirm they own/administer that org, Clevis connects it then and there (same Org + membership records the App-install and OAuth paths create). If the token lacks read:org, or GitHub reports you as a plain member rather than an admin, the token is still saved but only powers Overview's /me/analytics/overview endpoint — Repositories, Activity, Releases, Automation, and Collaborators need the step-2 App connection (or, for a non-admin, an accepted org invite) first, and those pages return a clear "isn't connected to Clevis yet" error until then.
Contributing
Contributions are welcome — see CONTRIBUTING.md for dev setup, CI checks, and commit conventions, and DESIGN.md for UI design language.
Found a security issue? Please follow the security policy rather than opening a public issue.
License
Released under the GNU General Public License v3.0.
Explorar proyectos relacionados
Cargando…