Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Prahari

Self-hosted network vulnerability scanning orchestrator. You define what to scan and which tools to run; Prahari executes each tool in its own container, normalises everything into one findings model, and gives you a dashboard, AI triage, exports, and reporting on top.

Prahari does not implement scanners. It wraps existing ones — nmap, nuclei, ZAP, trivy, httpx, testssl and others — behind a uniform contract, so adding a tool is a folder, not a code change.

cp .env.example .env          # optional; every value has a sane default
docker compose up -d --build

Then open http://localhost and sign in with admin / admin.

You are required to choose a new password before anything else works: while the default is in place, every other endpoint refuses the account. Upgrading an existing install applies the same rule to any account still on admin.


What it does

Scan profiles Targets (CIDRs, websites, Docker hosts), which components run, a schedule, and exclusions.
Execution Each component runs as a container. Local or distributed across remote agents with lease-based failover.
Findings One normalised model across every tool, with a stable fingerprint so the same issue is recognisable across runs.
Issue lifecycle Status, first/last seen, age and mean-time-to-resolve. A crashed scanner never marks anything as fixed.
Live updates One server-sent-events stream per tab, so pages refresh when something changes instead of polling.
AI triage Per-finding priority and remediation, run-level executive summary, and cross-finding root-cause correlation. Any provider via LiteLLM.
Exports JSON, CSV, PDF (two templates), SARIF 2.1.0 for CI, and CycloneDX 1.6 carrying VEX analysis state.
Integrations Apprise notifications (80+ services), Jira ticketing, scoped API tokens for automation.
Safety Target exclusions with exact CIDR subtraction, a global blocklist, maintenance windows, and pre-flight validation.

Safety posture

This is a tool that scans networks, so the defaults matter:

  • Exclusions are enforced at a single choke point — the one place a component's input is written — so no component can bypass them, and subtraction is exact rather than best-effort.
  • A global blocklist applies on top of every profile.
  • Pre-flight validation refuses a run that would do nothing or is misconfigured, before any container starts.
  • Maintenance windows stop scheduled scans firing during a change freeze.
  • Secrets are redacted before any text is sent to an LLM provider, and evidence can be withheld entirely.
  • Profile templates ship no targets, and cloned profiles are created inactive and manual — nothing starts scanning something you did not name.
  • Stored credentials are encrypted at rest when SETTINGS_ENCRYPTION_KEY is set, and that key is required under APP_ENV=production — LLM keys, Jira tokens and notification URLs are otherwise readable in any database dump.
  • The default password cannot be left in place: the API refuses an account that still has it.

Architecture at a glance

Browser ──:80──► nginx ──┬──► FastAPI backend (:8000) ──┬──► PostgreSQL 16
                         │                              ├──► docker-socket-proxy ──► component containers
                         └──► React SPA (static)        └──► SkyWalking agent (optional)

The backend talks to Docker through tecnativa/docker-socket-proxy rather than a mounted socket, so the API surface it can reach is restricted.

Stack: Python 3.12 · FastAPI · SQLAlchemy 2 · PostgreSQL 16 (SQLite for standalone) · APScheduler · LiteLLM · Apprise · WeasyPrint — and React 19 · TypeScript · Vite · Chakra UI · react-i18next (EN/DE).

API

79 endpoints, served under a versioned prefix:

  • /api/v1/... — the versioned contract. Use this.
  • /api/... — retained as a deprecated alias for one release.

Interactive docs: http://localhost/api/docs · schema: http://localhost/api/openapi.json

Documentation

Document For
USER_GUIDE.md Day-to-day use: profiles, runs, findings, triage, exports, settings.
SETUP.md Deployment, configuration, every setting, remote agents, integrations.
ARCHITECTURE.md How it fits together: layers, data model, design decisions, known gaps.
DEVELOPMENT.md Contributing: conventions, the traps this codebase has, testing rules.
LICENSE_MATRIX.md Which scanner integrations are safe to bundle commercially.

Read LICENSE_MATRIX.md before packaging a distribution — several integrations are intentionally BYO-image only for licensing reasons.

Testing

make test

1,254 tests: 998 backend (pytest) and 256 frontend (Vitest). The full gate, including a container health check and the suite running inside the image:

make verify

Repository layout

backend/          FastAPI app, services, migrations, tests
  app/services/   one module per concern; the bulk of the logic lives here
  app/ports/      Protocols for pluggable integrations (ticketing)
  app/adapters/   concrete integrations (Jira)
  migrations/     sequential SQL, applied automatically at startup
components/       one folder per scan tool — drop in, restart, done
frontend/         React SPA
nginx/            reverse proxy config, the only exposed port
docker-compose.yml
docker-compose.observability.yml

Status

Prahari is usable and under active development. ARCHITECTURE.md keeps an honest Gaps & Improvement Areas section listing what is not yet done — including multi-tenancy, an audit trail, finding lifecycle state, and horizontal scalability. Read it before deploying anywhere that matters.

License

See LICENSE_MATRIX.md for third-party scanner licensing.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages