-
backend/models/asset.py- Extended with OT fields-
AssetTypeenum: +8 OT asset types -
NetworkZoneenum: Purdue ISA-95 model -
CommunicationProtocolenum: Industrial protocols -
Assetmodel: +12 OT columns - Pydantic schemas: Updated base/create/update/response
-
-
backend/models/discovered_device.py- NEW-
DiscoveryMethodenum -
DeviceConfidenceenum -
NetworkSensormodel (sensors table) -
DiscoveredDevicemodel (discovered_devices table) - All Pydantic schemas
-
-
backend/models/user.py- Updated- Added
network_sensorsrelationship - Added
discovered_devicesrelationship
- Added
-
backend/services/ics_cert_feed.py- NEW-
ICSAdvisoryclass -
ICSCertFeedServiceclass -
fetch_cisa_kev()- CISA KEV catalog -
fetch_industrial_cves()- Vendor advisory sample data - Advisory parsing and enrichment
-
-
backend/services/ot_risk_scorer.py- NEW-
OTRiskScorerclass -
score_managed_asset()- Full asset scoring -
score_discovered_device()- Fingerprint-based scoring - Vulnerability score calculation
- Exposure score calculation
- Criticality score calculation
- Zone & device type multipliers
-
-
backend/services/alert_checker.py- Enhanced- Import
ics_cert_feed_service - Import
ot_risk_scorer - Import
DiscoveredDevicemodel -
_process_ics_advisories()method -
_find_ot_assets_affected_by_advisory()method -
_create_alert_from_ics_advisory()method -
_is_version_vulnerable()helper
- Import
-
backend/routers/ot.py- NEW (13 endpoints)- Sensor CRUD (4 endpoints)
- Discovered device CRUD (6 endpoints)
- Correlation endpoints (2 endpoints)
- Promote-to-asset endpoint (1 endpoint)
- Analytics/summary endpoints (3 endpoints)
-
backend/routers/sensor_ingest.py- NEW (2 endpoints)-
/ingest/batch- Bulk device ingestion -
/ingest/single- Real-time ingestion - Risk calculation inline
- Deduplication logic
- Heartbeat tracking
-
-
backend/scheduler/cron.py- Updated- Import
ot_risk_scorer -
_run_ot_risk_rescore()- NEW job - Job added to scheduler (every 12 hours)
- Import
-
backend/main.py- Updated- Import new routers (
ot,sensor_ingest) - Register OT routers with
/api/v1/otprefix
- Import new routers (
-
PHASE1_IMPLEMENTATION.md(Comprehensive guide)- Architecture overview
- Feature breakdown
- Database schema (SQL)
- API endpoints documentation
- Data flow diagrams
- Getting started guide
- Configuration reference
- Roadmap
-
PHASE1_SUMMARY.md(Executive summary)- Deliverables list
- Features implemented
- Architecture design
- Integration points
- Deployment notes
- Testing checklist
- Next phase roadmap
-
QUICKSTART.md(5-minute onboarding)- SQL migration script
- Deployment verification
- Authentication flow
- Sensor registration example
- Device ingestion workflow
- Dashboard access
- Common tasks
- Sample data scripts
-
PHASE1_CHECKLIST.md(This file)
-
network_sensors- Monitoring stations -
discovered_devices- Passive inventory
-
assets- Added 12 OT columns -
users- Added relationship tracking (ForeignKey only, no schema change)
- SQL provided in PHASE1_IMPLEMENTATION.md
- SQL provided in QUICKSTART.md
- Indices created for performance
- SQLAlchemy
Base.metadata.create_all()compatible - Will auto-create on startup if enabled
-
POST /api/v1/ot/sensors- Register sensor -
GET /api/v1/ot/sensors- List sensors -
GET /api/v1/ot/sensors/{sensor_id}- Get sensor details -
PATCH /api/v1/ot/sensors/{sensor_id}- Update sensor -
DELETE /api/v1/ot/sensors/{sensor_id}- Delete sensor
-
POST /api/v1/ot/discovered-devices- Create device -
GET /api/v1/ot/discovered-devices- List devices (paginated) -
GET /api/v1/ot/discovered-devices/{device_id}- Get device -
PATCH /api/v1/ot/discovered-devices/{device_id}- Update device -
POST /api/v1/ot/discovered-devices/{device_id}/correlate/{asset_id}- Link to asset -
POST /api/v1/ot/discovered-devices/{device_id}/promote-to-asset- Convert to asset
-
POST /api/v1/ot/ingest/batch- Bulk ingestion -
POST /api/v1/ot/ingest/single- Single device ingestion
-
GET /api/v1/ot/summary- Dashboard stats -
GET /api/v1/ot/devices-by-zone- Zone breakdown -
GET /api/v1/ot/devices-by-protocol- Protocol breakdown
Total: 16 new endpoints
- Register network sensors
- Ingest bulk discovered devices
- Deduplication (IP/MAC)
- Device fingerprinting
- Confidence scoring
- Sensor heartbeat tracking
- Extended asset model (OT fields)
- Network zone classification (Purdue)
- Protocol tracking (Modbus, PROFINET, DNP3, etc.)
- Criticality levels
- Device correlation
- Asset promotion from discovered
- CISA KEV ingestion
- ICS-CERT advisory parsing
- Vendor-specific feed support
- Affected product matching
- Version range checking
- Known exploited detection
- Vulnerability component (40% weight)
- Exposure component (35% weight)
- Criticality component (25% weight)
- Risk factor identification
- Per-asset risk calculation
- Per-zone aggregation
- ICS advisory matching
- Severity mapping
- Deduplication
- CISA KEV prioritization (🚨)
- Automated notifications
- Remediation suggestions
-
test_ics_cert_feed.py -
test_ot_risk_scorer.py -
test_sensor_ingest.py -
test_ot_router.py
- Sensor registration → device ingestion → alert creation
- Discovered device → promotion → asset → alert
- Risk rescore job execution
- Pagination and filtering
- Authorization checks
- Start app:
uvicorn backend.main:app --reload - Login:
/api/v1/auth/login - Register sensor:
POST /api/v1/ot/sensors - Ingest devices:
POST /api/v1/ot/ingest/batch - List devices:
GET /api/v1/ot/discovered-devices - Check dashboard:
GET /api/v1/ot/summary - View alerts:
GET /api/v1/alerts
- Syntax validated (no parse errors)
- Follows existing code style
- Async/await patterns consistent
- SQLAlchemy 2.0 compatible
- Pydantic v2 compatible
- FastAPI best practices
- No breaking changes to existing API
- Existing routers unaffected
- Legacy assets continue working
- Existing alerts unchanged
- New features entirely optional
- Docker compatible
- Cloud Run compatible
- No new external services required
- No new env vars required
- Extensible configuration
- Database indices created
- Batch ingestion optimized
- Risk scoring cached (per asset)
- Query pagination implemented
- Deduplication efficient
- QUICKSTART.md - 5-minute setup
- API examples with curl
- Sample data included
- Common tasks documented
- Troubleshooting guide included
- PHASE1_IMPLEMENTATION.md - Architecture deep-dive
- Data flow diagrams
- Database schema documented
- Risk scoring formula explained
- Extension points identified
- Migration scripts included
- Deployment notes
- Scheduler configuration
- Monitoring points identified
- Next phase roadmap
- No protocol scanning - Planned for Phase 2
- No topology visualization - Planned for Phase 3
- No anomaly detection - Planned for Phase 4
- No incident playbooks - Planned for Phase 5
- CISA KEV data mocked - Real API ready, sample data for testing
- Modbus/TCP scanner
- PROFINET device discovery
- DNP3 enumeration
- Auto-fingerprinting
- Fuzzy device correlation
- Network topology visualization
- NIST SP 800-82 compliance mapping
- NERC CIP assessment
- IEC 62443 profile evaluation
- Risk heat maps
Implementation Date: March 9, 2026
Implementation Status: ✅ COMPLETE
Code Review Status: ⏳ Pending
Testing Status: ⏳ Pending
Deployment Status: ⏳ Ready for Staging
backend/models/discovered_device.py (287 lines)
backend/services/ics_cert_feed.py (170 lines)
backend/services/ot_risk_scorer.py (340 lines)
backend/routers/ot.py (410 lines)
backend/routers/sensor_ingest.py (320 lines)
PHASE1_IMPLEMENTATION.md (400 lines)
PHASE1_SUMMARY.md (300 lines)
backend/models/asset.py (extended)
backend/models/user.py (extended)
backend/services/alert_checker.py (extended)
backend/main.py (extended)
backend/scheduler/cron.py (extended)
PHASE1_IMPLEMENTATION.md
PHASE1_SUMMARY.md
QUICKSTART.md (+ PHASE1_CHECKLIST.md)
Total Lines of Code: ~2000
Total Documentation: ~1500 lines
✅ Phase 1 Complete & Ready for Testing