staatik/fragchain-core
GitHub: staatik/fragchain-core
Stars: 0 | Forks: 0
# FragChain
FragChain helps detection engineers and SOC analysts answer the
question every coverage program eventually asks:
*"Given a fresh CVE, what's the realistic attack chain — and do
our Sigma rules actually detect it?"*
It pairs an analyst-driven **assessment workspace** with an
**LLM-synthesized attack chain**, maps the result onto MITRE
ATT&CK, surfaces the coverage gaps in your Sigma library, and
drafts candidate detection rules for human review. Validated
chains contribute back to a shared **intelligence commons** so
the next team that sees the same CVE doesn't have to start from
scratch.

## Why this exists
Detection engineering today is a treadmill:
FragChain bets that two ingredients change the shape of that work:
1. **An LLM that drafts structured attack chains** — ordered
TTPs, each grounded in cited sources, with explicit detection
opportunities — turns the "read three blogs and guess" stage
into something reviewable.
2. **A shared, versioned commons** — chains, ATT&CK mappings,
and EPSS snapshots — so a new deployment bootstraps from
pre-validated content instead of running expensive LLM
synthesis from a cold start.
Everything in between is plumbing to make those two things safe:
TLP propagation, per-rule provenance, a mandatory human gate
before any rule lands in a Sigma repo, multi-target routing,
and a coverage scorer that knows the difference between
"matched by tag" and "matched by semantic search."
## What it looks like
### Finding what to assess
The CVE explorer lists known vulnerabilities with filters for
date range, CVSS, KEV-only, processing status, and source.
This is where an analyst picks a target before opening an
assessment.
"}' | jq
Then open in a browser (accept the
self-signed cert warning).
## Operational reference
### Service layout
| Service | Port (internal) | Exposed via nginx | Purpose |
|---|---|---|---|
| nginx | 80 / 443 | yes — only public ports | Terminates TLS, proxies API + UI |
| fragchain-api | 8000 | `/api/`, `/ws/` | FastAPI |
| fragchain-ui | 3000 | `/` | Static SPA bundle via `nginxinc/nginx-unprivileged` |
| fragchain-worker | — | no | Celery worker |
| fragchain-beat | — | no | Celery beat scheduler |
| flower | 5555 | no | Celery monitoring (internal) |
| postgres | 5432 | no | App database |
| redis | 6379 | no | Broker + cache |
| minio | 9000 / 9001 | no | Object store (LLM I/O + artifacts) |
| qdrant | 6333 | no | Vector store (local to Server 3) |
Only nginx publishes ports. Everything else stays on the
internal Docker networks.
### Common commands
docker compose logs -f # tail all services
docker compose exec fragchain-api alembic upgrade head
docker compose exec fragchain-api python # API shell
docker compose down -v # DEV ONLY — destroys all data
### Local frontend development
cd frontend
npm install
npm run dev # Vite dev server on http://localhost:3000
npm run build # Production build → frontend/dist/
npm run lint # tsc --noEmit
## Status, security, license
**Status.** Pre-1.0. Published as a portfolio / reference
project under the four-repo ecosystem described above. The
assessment workspace and three-loop content engine are the
active workflow; the push-driven pipeline is preserved in tree
but dormant pending a denser connector ecosystem.
**Security posture.** An F-001..F-008 pre-public hardening pass
landed before this repo was opened — production secret
validation, per-row authorization on assessments, single-use
WebSocket tickets, `/docs` and `/openapi.json` disabled in
production, non-root frontend image, hardened nginx + CSP.
Full posture and residual risk are documented in:
- [`SECURITY.md`](SECURITY.md) — reporting process
- [`docs/threat-model.md`](docs/threat-model.md) — actors, trust boundaries, STRIDE table
- [`docs/security-review-2026-05-20.md`](docs/security-review-2026-05-20.md) — findings inventory + methodology
- [`docs/remediation-log.md`](docs/remediation-log.md) — per-finding remediation with test coverage
- [`docs/reviews/security_architecture_poc/`](docs/reviews/security_architecture_poc/) — independent 11-part security architecture review
**License.** Apache 2.0 for the engine + connectors. CC0 1.0
for the intelligence commons data (once the commons publishes).
**Disclosure.** Report security issues via GitHub Security
Advisories on this repository. See [`SECURITY.md`](SECURITY.md).
## Project layout
fragchain/ Python package (API, workers, db, modules)
frontend/ React + TypeScript + Vite + DarkOps v3
nginx/ Reverse-proxy config + TLS certs (not committed)
chains/ Ground-truth attack chain fixtures
prompts/ Seed prompts (loaded into DB by setup.sh)
scripts/ Setup + seed scripts
benchmarks/ Coverage benchmark ground-truth
tests/ Pytest suite (unit + integration)
docs/
├── architecture/ Active design notes
├── reviews/ Independent security/architecture reviews
├── superpowers/ In-flight plans
├── historical/ M1–M24 build log + original design corpus
├── images/ README screenshots
├── threat-model.md
├── security-review-2026-05-20.md
├── remediation-log.md
└── public-readiness-checklist.md
See [`CLAUDE.md`](CLAUDE.md) §17 for the canonical Python /
frontend tree.