Skip to content

feat: change detection — track network changes between scans (#79) - #86

Merged
reloadfast merged 1 commit into
mainfrom
feat/change-detection-79
Mar 1, 2026
Merged

reloadfast merged 1 commit into
mainfrom
feat/change-detection-79

Conversation

@reloadfast

Copy link
Copy Markdown
Owner

Summary

Closes #79

Transforms NetworkCrawler from a point-in-time scanner into a continuous monitoring tool by tracking what changes between scans.

Changes detected

Event Trigger
device_appeared New IP found on the network
device_disappeared Previously-seen IP not found in this scan
port_opened Port/protocol newly open on an existing device
port_closed Port/protocol no longer open
risk_appeared New misconfiguration detected
risk_resolved Previously detected risk is gone

Backend

  • models/scan_event.py: New ScanEvent ORM model (scan_events table)
  • scan_runner.py: _persist_result returns _PersistSummary with new devices, disappeared IPs, port diffs; _record_scan_events() writes events after each scan
  • api/__init__.py: GET /changes, GET /changes/summary, PATCH /changes/{id}/reviewed, PATCH /changes/reviewed/all

Frontend

  • ChangesPage: timeline of events grouped by scan with per-event and bulk dismiss
  • useChanges + useChangesSummary hooks
  • Nav link Changes with live unreviewed count badge (polls every 30 s)

- ScanEvent model: device_appeared/disappeared, port_opened/closed, risk_appeared/resolved
- scan_runner: detect and persist change events after each scan
  - new devices, disappeared IPs, port diffs per device, risk before/after diffs
- API: GET /changes, GET /changes/summary, PATCH /changes/{id}/reviewed, PATCH /changes/reviewed/all
- Changes page: timeline grouped by scan, dismiss per-event or all
- Nav: 'Changes' link with live unreviewed count badge (polls every 30s)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@reloadfast
reloadfast merged commit 17b70e7 into main Mar 1, 2026
7 checks passed
@reloadfast
reloadfast deleted the feat/change-detection-79 branch March 1, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change detection: track new/disappeared devices and port/risk diffs between scans

1 participant