Add local Windows Server inventory collection and validation; include core package

This commit is contained in:
2026-10-30 11:24:40 -07:00
parent 967b2bd46a
commit f65ade9fff
35 changed files with 2200 additions and 56 deletions

View File

@@ -8,6 +8,7 @@ from samsara.ui.branding import application_icon
from samsara.collectors.demo import collect_demo, DEMO_HOST, LINUX_DEMO_HOST
from samsara.collectors.importer import load_inventory
from samsara.collectors.linux import collect_local_linux, CollectionCancelled
from samsara.collectors.windows import collect_local_windows
from samsara.core.detection import detect_local_os, check_profile, PROFILES
from samsara.analyzers.assessment import assess
from samsara.analyzers.summary import summarize
@@ -28,11 +29,12 @@ class CollectionJob(QThread):
if self.source == 'local':
self.stage.emit('Detecting operating system…')
detected = detect_local_os()
if detected['platform'] != 'linux':
raise ValueError('Windows live collection is not available yet. Open a saved inventory or a sample assessment.')
check_profile(detected, self.profile)
self.stage.emit('Detected ' + detected['name'] + '. Collecting inventory…')
data = collect_local_linux(stage=self.stage.emit, cancelled=self.isInterruptionRequested)
if detected['platform'] == 'windows':
data = collect_local_windows(profile=self.profile, stage=self.stage.emit, cancelled=self.isInterruptionRequested)
else:
check_profile(detected, self.profile)
data = collect_local_linux(stage=self.stage.emit, cancelled=self.isInterruptionRequested)
elif self.source == 'file':
self.stage.emit('Reading saved inventory…')
data = load_inventory(self.inventory_path)
@@ -308,7 +310,7 @@ class MainWindow(QMainWindow):
reports.addStretch()
settings = self.page('Settings', 'Collection availability and assessment behavior.')
settings.addWidget(self.label('Windows Server 2016 / 2019 / 2022 / 2025\nRed Hat Enterprise Linux 7 (legacy) / 8 / 9 / 10 and compatible distributions'))
settings.addWidget(self.label('Local Linux collection is available. Live Windows and remote collection are not available yet. Saved inventories and samples work on either desktop.', muted=True))
settings.addWidget(self.label('Local Windows Server and Linux collectors are available. Windows validation on a supported host is pending. Remote collection is a separate follow-up. Saved inventories and samples work on either desktop.', muted=True))
settings.addWidget(self.label('Read-only collection • No credentials stored • Session history only', muted=True))
settings.addStretch()