feat: sprint 3 — multi-technique simulations + MITRE matrix modal #6
Reference in New Issue
Block a user
Delete Branch "sprint/3-mitre-matrix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
GET /api/mitre/matrixexposant le tree tactique → technique → sub-techniquemitre_technique_id/mitre_technique_namescalaires →techniques: [{id, name, tactics}]array. Migration Alembic 0003 backfille les simulations existantes.Tests
Test plan
make build && make startmake create-admin USER=alice PASS=changeme8(si premier setup)T1059Enter → tag apparaît + toast, re-essayer même ID → no-op silencieuxT1059 +2ou—review_required: tags read-only, boutons Add/Quick Search masquéspendingflip àin_progressNotes
make update-mitrepour refresh🤖 Generated with Claude Code
- Simulation model: replace mitre_technique_id/name scalars with techniques JSON column [{id, name}] - Alembic migration 0003: add techniques, backfill from scalars, drop old columns (reversible) - MITRE service: add get_tactics(), lookup_name(), get_matrix() with canonical tactic order and sub-technique nesting - serializer: enrich techniques with tactics from service at serialize time (graceful empty tactics if bundle outdated) - simulation_workflow: PATCH now accepts technique_ids list, validates against bundle, deduplicates preserving order, auto-transitions on non-empty list - simulations API: add GET /api/mitre/matrix endpoint (503 if bundle absent) - test_mitre.py: updated _reset_mitre fixture, added T1059.006 sub-technique, 14 new tests for get_tactics/lookup_name/get_matrix/matrix endpoint - test_simulations_techniques.py: 20 new tests covering AC-13.1 to AC-13.5 (create, PATCH, dedup, auto-transition, SOC blocked, migration backfill logic) Total: 161 tests passing. ruff clean. mypy: no new errors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>