Skip to content

Refactor CLI and SNMP engine, enhance TUI progress bar, and fix scanner#34

Merged
kbtale merged 7 commits into
mainfrom
dev/fixes
May 10, 2026
Merged

Refactor CLI and SNMP engine, enhance TUI progress bar, and fix scanner#34
kbtale merged 7 commits into
mainfrom
dev/fixes

Conversation

@kbtale

@kbtale kbtale commented May 10, 2026

Copy link
Copy Markdown
Member

No description provided.

kbtale added 7 commits May 10, 2026 15:44
…mp_engine

- Remove hacky startswith('schedule ') string-splitting path in CLI
  dispatch; the nargs='*' argparse path handles the case already
- Remove unused local load_config() in snmp_engine that shadowed
  the imported load_base_config and duplicated the centralized parser
- Remove dead imports (json, os, resource_path, runtime_path) from snmp_engine
Shows a 20-char progress bar with percentage mapped to scan phases
(ICMP 30%, TCP 60%, enrichment 85%, done 100%) plus elapsed time.
Timer resets on each new scan.
…ures

- Cut port list from 9 to 5 (80, 443, 445, 3389, 22)
- Cap max_candidates at 128 (was formula-based, could reach 960)
- Hardcoded tcp_timeout at 0.3s instead of variable formula
- Add type annotations to all processor.py public functions
- Remove unused get_system_status import from main.py
…o int

Also normalize lone lowercase add_log_entry('info', ...) to 'INFO'.
- New src/backend/incremental.py: split_targets() categorizes hosts
  by temporal state (seen >= 2, no flaps → cached; else fresh)
- Cached hosts skip expensive WMI/SNMP probes; enrichment data
  comes from previous database sightings instead
- ICMP sweep still runs for all hosts (fast with raw sockets)
- 16 unit tests covering stability criteria, splitting, and
  database-backed cached host data retrieval
…ental scan

- New test_e2e_smoke.py: 4 integration tests covering full pipeline
  (all phases, ingestion, scope deny, empty network)
- Fix 4 enrichment tests to mock split_targets — incremental scan
  now splits hosts into cached/fresh, changing target counts
Silently return empty results when asset_sightings/canonical_assets
tables haven't been created (first-ever scan). Prevents OperationalError
in tests that run discover_all without init_db.
@kbtale kbtale merged commit bede3ed into main May 10, 2026
12 checks passed
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.

1 participant