Commit Graph

3 Commits

Author SHA1 Message Date
drjones
08b12e2ce2 Wire AI features to Claude (claude-sonnet-5); fix key detection + retired model
Some checks failed
Deploy / deploy (push) Has been cancelled
Deploy / docker-build (push) Has been cancelled
Test / backend-test (push) Has been cancelled
Test / frontend-test (push) Has been cancelled
Test / security-scan (push) Has been cancelled
The Anthropic path could never activate: it gated on
`not ANTHROPIC_API_KEY.startswith("sk-ant-")`, but real Anthropic keys start
with `sk-ant-`, so any real key was treated as a placeholder and every request
fell back to mock. It also targeted the retired `claude-3-haiku-20240307`.

- ai_translator.py: add `_real_key()` placeholder detection (rejects `sk-ant-...`,
  `changeme`, `your-`, etc. — accepts real secrets), centralize provider gating
  in `_ai_enabled()`, and point all three AI features (finding translation,
  security coach, attack-path narrative) at `claude-sonnet-5` with thinking
  disabled for fast structured output. OpenAI kept as a secondary provider.
- config.py / .env.example: default AI_PROVIDER to anthropic.

Mock mode still works with no key configured; dropping in a real
ANTHROPIC_API_KEY now actually enables live Claude.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 17:20:31 +00:00
drjones
631a6b4147 Fix code issues and add missing documentation
- Fix duplicate tenant_id parameter in seed.py (line 148)
- Add security warning to SECRET_KEY in .env.example
- Create comprehensive README.md with setup instructions
- Add Alembic configuration files (alembic.ini, env.py, script.py.mako)
- Create initial database migration for all tables
- Document project structure, features, and deployment checklist
2026-07-06 02:58:08 +00:00
drjones
463dff883b feat: initial TrustOS platform scaffold
- FastAPI backend: auth, findings, dashboard, attack paths, footprint, AI translator, risk calculator, PDF report generator
- Next.js frontend: Vault dashboard, login, findings table, finding detail with AI coach, digital footprint, reports
- PostgreSQL data model: tenants, users, assets, findings, risk scores, audit reports, attack paths
- Docker Compose + Dockerfiles for all services
- Demo seed data: Acme Corp with 6 findings and 90-day risk score history
- AI Risk Translator (OpenAI/Anthropic) with plain-English business impact
- Role-based access: executive / it_admin / trustos_admin
- Scope-lock engine: authorization required before any assessment

Stage 1-8 complete: Phase 1 Vault Audit product ready
2026-07-05 09:46:08 +00:00