Multi-user third-party risk scoring for small businesses. List the vendors you depend on; VendorChain ranks which would hurt you most if compromised — alone and through the trust chain — and recommends remove / limit / watch.
Built as a SoK guided implementation: hexagonal Python core, Streamlit UI, SQLite system of record seeded from a versioned JSON vendor-intel catalog.
- Org registration, member invites (
owner/analyst/viewer), tenant isolation - Per-vendor Access / Weakness / Damage scores (NIST SP 800-30 shaped, versioned
v1model) - Chain propagation with explainability paths and concentration flags
- What-if scenarios (reduce access, add controls, remove edges)
- Curated catalog (~25 vendors) with breaches, certs, MFA posture
- Demo fixtures: restaurant SMB, Target 2013 HVAC replay
- CLI evaluation harness for SoK tables
- Audit log of org/graph/assessment actions
cd vendorchain
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
# create schema + seed catalog from data/catalog/vendors_v1.json
vendorchain-seed
# run the web app (FastAPI + real HTML/CSS UI)
vendorchain-web
# or: uvicorn vendorchain.adapters.web.app:app --reload --port 8000Guided flow
- Landing → Get started
- Create account
- Create a business (or load a sample)
- Add companies → map connections → show ranking → try a fix
Share with others (Docker + ngrok)
docker compose up --build
# in another terminal:
ngrok http 8000Send the ngrok HTTPS URL to teammates or graders.
Streamlit remains in the repo only as a legacy adapter; the primary UI is the web app.
pytest -qvendorchain-eval \
--fixture restaurant.json \
--fixture target_2013.json \
--db sqlite:///data/eval.db \
--out data/eval_outWrites CSV / Markdown / JSON comparing standalone vs chain ranks (and ground-truth top-k hits).
export VENDORCHAIN_SECRET_KEY='replace-with-long-random'
docker compose up --buildSQLite lives in the vc_data volume. Swap to Postgres later by setting VENDORCHAIN_DATABASE_URL=postgresql+psycopg://... (same SQLAlchemy models).
adapters/streamlit → application services → domain (scoring, chain, policy)
adapters/cli → ↓
infrastructure (SQLAlchemy repos, argon2, JSON seeder)
- JSON (
data/catalog/) = curated public intel, seeded into SQLite - SQLite = users, orgs, memberships, vendor graphs, assessment snapshots, audit
- Domain never imports Streamlit or SQLAlchemy
- Passwords hashed with argon2id
- Sessions stored server-side; Streamlit keeps only the session token
- Every use case checks org membership (fail closed); viewers cannot mutate
- Graph size limits (
max_vendors_per_org,max_edges_per_org) - Catalog/fixtures loaded only from the package
data/directory - Vendor graphs are sensitive business intel — no telemetry by default
- Set
VENDORCHAIN_SECRET_KEYin any shared deployment
| Variable | Purpose |
|---|---|
VENDORCHAIN_DATABASE_URL |
SQLAlchemy URL (default: data/vendorchain.db) |
VENDORCHAIN_SECRET_KEY |
App secret |
VENDORCHAIN_SESSION_HOURS |
Session lifetime (default 12) |
src/vendorchain/
domain/ entities, scoring v1, chain propagator, policies
application/ auth, org, vendor graph, assessment, what-if
infrastructure/ SQLAlchemy, repos, seed, container
adapters/streamlit/
adapters/cli/
data/catalog/ vendors_v1.json
data/fixtures/ restaurant.json, target_2013.json
data/scoring_models/v1.yaml
alembic/ migrations
Assessment inputs (vendor relationships, access levels) can reveal how your business operates. Keep the SQLite file protected; do not commit data/*.db.