umer-wasim commited on
Commit
18d296d
·
verified ·
1 Parent(s): 8b38665

Catalog, library and synthetic data v0.2: user account type, USB device access, vulnerabilities

Browse files
.gitignore CHANGED
@@ -11,3 +11,5 @@ training/out/
11
  training/.venv/
12
  training/models/
13
  app/node_modules/
 
 
 
11
  training/.venv/
12
  training/models/
13
  app/node_modules/
14
+ synthetic/out-v0.2/
15
+ training/out-v0.2/
README.md CHANGED
@@ -150,6 +150,14 @@ npm start # run the app
150
 
151
  Offline fine-tuning on CPU: `training/train_lora.py` (LoRA on Qwen2.5-0.5B-Instruct; see `--benchmark` and `--resume`).
152
 
 
 
 
 
 
 
 
 
153
  ## Test status (collector version 0.1.0)
154
 
155
  | Collector | How it was tested |
 
150
 
151
  Offline fine-tuning on CPU: `training/train_lora.py` (LoRA on Qwen2.5-0.5B-Instruct; see `--benchmark` and `--resume`).
152
 
153
+ ## Version status
154
+
155
+ | Part | Version | Notes |
156
+ |---|---|---|
157
+ | Catalog, library, synthetic data, training data | **0.2** | 68 checks: adds signed-in user account type, USB device access, pending security updates, outdated apps, known vulnerabilities, Windows screen lock line; screen lock limit 5 minutes |
158
+ | Collectors (Windows, Linux, macOS) | 0.1 | Still report the 0.1 checks; updating them to 0.2 is the next step |
159
+ | Fine-tuned model | training on 0.1 data | First run in progress on CPU |
160
+
161
  ## Test status (collector version 0.1.0)
162
 
163
  | Collector | How it was tested |
baseline.conf CHANGED
@@ -25,9 +25,12 @@ MACOS_XPROTECT_MAX_AGE_DAYS=30
25
  FIREWALL_OUTBOUND=allow
26
 
27
  # --- Screen lock -----------------------------------------------------------
28
- SCREEN_LOCK_MAX_SECONDS=900
 
29
 
30
  # --- USB storage (allow | deny) --------------------------------------------
 
 
31
  USB_READ=allow
32
  USB_WRITE=deny
33
 
@@ -37,6 +40,12 @@ APPROVED_ADMINS=itadmin
37
  # Windows: a disabled built-in Administrator (RID 500) is not counted as unauthorized.
38
  ALLOW_DISABLED_BUILTIN_ADMIN=1
39
 
 
 
 
 
 
 
40
  # --- GDPR technical controls ----------------------------------------------
41
  UPDATES_MAX_AGE_DAYS=30
42
  BACKUP_MAX_AGE_DAYS=7
 
25
  FIREWALL_OUTBOUND=allow
26
 
27
  # --- Screen lock -----------------------------------------------------------
28
+ # 300 seconds = 5 minutes
29
+ SCREEN_LOCK_MAX_SECONDS=300
30
 
31
  # --- USB storage (allow | deny) --------------------------------------------
32
+ # Whether USB mass storage devices may connect at all (deny = blocked completely).
33
+ USB_DEVICE_ACCESS=allow
34
  USB_READ=allow
35
  USB_WRITE=deny
36
 
 
40
  # Windows: a disabled built-in Administrator (RID 500) is not counted as unauthorized.
41
  ALLOW_DISABLED_BUILTIN_ADMIN=1
42
 
43
+ # --- Vulnerabilities -------------------------------------------------------
44
+ MAX_PENDING_SECURITY_UPDATES=0
45
+ MAX_OUTDATED_APPS=0
46
+ # Critical or high vulnerabilities allowed in installed software (offline OSV/NVD data)
47
+ MAX_CRITICAL_HIGH_VULNERABILITIES=0
48
+
49
  # --- GDPR technical controls ----------------------------------------------
50
  UPDATES_MAX_AGE_DAYS=30
51
  BACKUP_MAX_AGE_DAYS=7
catalog/checks.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "catalog_version": "0.1.0",
3
  "statuses": ["Compliant", "Non-Compliant", "NotApplicable", "Pending", "Error"],
4
  "status_meaning": {
5
  "Compliant": "The device meets the baseline value.",
@@ -101,10 +101,11 @@
101
  { "id": "firewall.public.inbound", "section": "baseline", "name": "Public inbound", "os": ["windows"], "baseline_keys": [], "rule": "Public profile default inbound action is Block.", "controls": { "iso27001": ["A.8.20"], "gdpr": ["Art. 32(1)(b)"], "ai_act": [] } },
102
  { "id": "firewall.public.outbound", "section": "baseline", "name": "Public outbound", "os": ["windows"], "baseline_keys": ["FIREWALL_OUTBOUND"], "rule": "Public profile default outbound action equals FIREWALL_OUTBOUND.", "controls": { "iso27001": ["A.8.20"], "gdpr": ["Art. 32(1)(b)"], "ai_act": [] } },
103
 
104
- { "id": "screen_lock.enabled", "section": "baseline", "name": "Screen lock", "os": ["linux", "macos"], "baseline_keys": [], "rule": "The screen locks when idle.", "controls": { "iso27001": ["A.8.1", "A.7.7"], "gdpr": ["Art. 32(1)(b)"], "ai_act": [] } },
105
- { "id": "screen_lock.timeout", "section": "baseline", "name": "Screen lock timeout", "os": ["windows", "linux", "macos"], "baseline_keys": ["SCREEN_LOCK_MAX_SECONDS"], "rule": "Idle time before lock (including any grace delay) is 1..SCREEN_LOCK_MAX_SECONDS seconds.", "controls": { "iso27001": ["A.8.1", "A.7.7"], "gdpr": ["Art. 32(1)(b)"], "ai_act": [] } },
106
  { "id": "screen_lock.password", "section": "baseline", "name": "Screen lock password requirement", "os": ["windows", "linux", "macos"], "baseline_keys": [], "rule": "A password is required to unlock (macOS: within 5 seconds of the screen locking).", "controls": { "iso27001": ["A.8.1", "A.7.7", "A.8.5"], "gdpr": ["Art. 32(1)(b)"], "ai_act": [] } },
107
 
 
108
  { "id": "usb.read", "section": "baseline", "name": "USB storage read", "os": ["windows", "linux", "macos"], "baseline_keys": ["USB_READ"], "rule": "Effective USB storage read access equals USB_READ (allow/deny).", "controls": { "iso27001": ["A.7.10", "A.8.12"], "gdpr": ["Art. 32(1)(b)"], "ai_act": [] } },
109
  { "id": "usb.write", "section": "baseline", "name": "USB storage write", "os": ["windows", "linux", "macos"], "baseline_keys": ["USB_WRITE"], "rule": "Effective USB storage write access equals USB_WRITE (allow/deny).", "controls": { "iso27001": ["A.7.10", "A.8.12"], "gdpr": ["Art. 32(1)(b)"], "ai_act": [] } },
110
 
@@ -115,6 +116,10 @@
115
  { "id": "encryption.enabled", "section": "baseline", "name": "Encryption", "os": ["windows", "linux", "macos"], "baseline_keys": [], "rule": "The system disk is fully encrypted (BitLocker / LUKS / FileVault).", "controls": { "iso27001": ["A.8.24", "A.8.1"], "gdpr": ["Art. 32(1)(a)"], "ai_act": [] } },
116
  { "id": "encryption.protection", "section": "baseline", "name": "Disk encryption protection", "names": { "windows": "BitLocker protection" }, "os": ["windows", "linux", "macos"], "baseline_keys": [], "rule": "Encryption protection is active (not suspended or in progress) with a strong cipher.", "controls": { "iso27001": ["A.8.24"], "gdpr": ["Art. 32(1)(a)"], "ai_act": [] } },
117
  { "id": "encryption.recovery", "section": "baseline", "name": "Disk encryption recovery", "names": { "windows": "BitLocker recovery" }, "os": ["windows", "linux", "macos"], "baseline_keys": [], "rule": "A recovery key or second unlock method exists.", "controls": { "iso27001": ["A.8.24", "A.8.13"], "gdpr": ["Art. 32(1)(a)", "Art. 32(1)(c)"], "ai_act": [] } },
 
 
 
 
118
 
119
  { "id": "gdpr.auto_updates", "section": "gdpr", "name": "Automatic security updates", "os": ["windows", "linux", "macos"], "baseline_keys": [], "rule": "Security updates are downloaded and installed automatically.", "controls": { "iso27001": ["A.8.8"], "gdpr": ["Art. 32(1)(b)"], "ai_act": [] } },
120
  { "id": "gdpr.updates_recent", "section": "gdpr", "name": "Security updates installed recently", "os": ["windows", "linux", "macos"], "baseline_keys": ["UPDATES_MAX_AGE_DAYS"], "rule": "Last successful update/package change within UPDATES_MAX_AGE_DAYS days.", "controls": { "iso27001": ["A.8.8"], "gdpr": ["Art. 32(1)(b)", "Art. 32(1)(d)"], "ai_act": [] } },
 
1
  {
2
+ "catalog_version": "0.2.0",
3
  "statuses": ["Compliant", "Non-Compliant", "NotApplicable", "Pending", "Error"],
4
  "status_meaning": {
5
  "Compliant": "The device meets the baseline value.",
 
101
  { "id": "firewall.public.inbound", "section": "baseline", "name": "Public inbound", "os": ["windows"], "baseline_keys": [], "rule": "Public profile default inbound action is Block.", "controls": { "iso27001": ["A.8.20"], "gdpr": ["Art. 32(1)(b)"], "ai_act": [] } },
102
  { "id": "firewall.public.outbound", "section": "baseline", "name": "Public outbound", "os": ["windows"], "baseline_keys": ["FIREWALL_OUTBOUND"], "rule": "Public profile default outbound action equals FIREWALL_OUTBOUND.", "controls": { "iso27001": ["A.8.20"], "gdpr": ["Art. 32(1)(b)"], "ai_act": [] } },
103
 
104
+ { "id": "screen_lock.enabled", "section": "baseline", "name": "Screen lock", "os": ["windows", "linux", "macos"], "baseline_keys": [], "rule": "The screen locks when idle (Windows: machine inactivity limit or a password-protected screen saver).", "controls": { "iso27001": ["A.8.1", "A.7.7"], "gdpr": ["Art. 32(1)(b)"], "ai_act": [] } },
105
+ { "id": "screen_lock.timeout", "section": "baseline", "name": "Screen lock timeout", "os": ["windows", "linux", "macos"], "baseline_keys": ["SCREEN_LOCK_MAX_SECONDS"], "rule": "Idle time before lock (including any grace delay) is 1..SCREEN_LOCK_MAX_SECONDS seconds (baseline: 300 = 5 minutes).", "controls": { "iso27001": ["A.8.1", "A.7.7"], "gdpr": ["Art. 32(1)(b)"], "ai_act": [] } },
106
  { "id": "screen_lock.password", "section": "baseline", "name": "Screen lock password requirement", "os": ["windows", "linux", "macos"], "baseline_keys": [], "rule": "A password is required to unlock (macOS: within 5 seconds of the screen locking).", "controls": { "iso27001": ["A.8.1", "A.7.7", "A.8.5"], "gdpr": ["Art. 32(1)(b)"], "ai_act": [] } },
107
 
108
+ { "id": "usb.device_access", "section": "baseline", "name": "USB storage device access", "os": ["windows", "linux", "macos"], "baseline_keys": ["USB_DEVICE_ACCESS"], "rule": "Whether USB mass storage devices can connect at all equals USB_DEVICE_ACCESS (allow/deny): driver, device-installation policy, USBGuard or MDM restriction.", "controls": { "iso27001": ["A.7.10", "A.8.12"], "gdpr": ["Art. 32(1)(b)"], "ai_act": [] } },
109
  { "id": "usb.read", "section": "baseline", "name": "USB storage read", "os": ["windows", "linux", "macos"], "baseline_keys": ["USB_READ"], "rule": "Effective USB storage read access equals USB_READ (allow/deny).", "controls": { "iso27001": ["A.7.10", "A.8.12"], "gdpr": ["Art. 32(1)(b)"], "ai_act": [] } },
110
  { "id": "usb.write", "section": "baseline", "name": "USB storage write", "os": ["windows", "linux", "macos"], "baseline_keys": ["USB_WRITE"], "rule": "Effective USB storage write access equals USB_WRITE (allow/deny).", "controls": { "iso27001": ["A.7.10", "A.8.12"], "gdpr": ["Art. 32(1)(b)"], "ai_act": [] } },
111
 
 
116
  { "id": "encryption.enabled", "section": "baseline", "name": "Encryption", "os": ["windows", "linux", "macos"], "baseline_keys": [], "rule": "The system disk is fully encrypted (BitLocker / LUKS / FileVault).", "controls": { "iso27001": ["A.8.24", "A.8.1"], "gdpr": ["Art. 32(1)(a)"], "ai_act": [] } },
117
  { "id": "encryption.protection", "section": "baseline", "name": "Disk encryption protection", "names": { "windows": "BitLocker protection" }, "os": ["windows", "linux", "macos"], "baseline_keys": [], "rule": "Encryption protection is active (not suspended or in progress) with a strong cipher.", "controls": { "iso27001": ["A.8.24"], "gdpr": ["Art. 32(1)(a)"], "ai_act": [] } },
118
  { "id": "encryption.recovery", "section": "baseline", "name": "Disk encryption recovery", "names": { "windows": "BitLocker recovery" }, "os": ["windows", "linux", "macos"], "baseline_keys": [], "rule": "A recovery key or second unlock method exists.", "controls": { "iso27001": ["A.8.24", "A.8.13"], "gdpr": ["Art. 32(1)(a)", "Art. 32(1)(c)"], "ai_act": [] } },
119
+ { "id": "user.account_type", "section": "baseline", "name": "Signed-in user account type", "os": ["windows", "linux", "macos"], "baseline_keys": ["APPROVED_ADMINS"], "rule": "The everyday signed-in user is a Standard account (not an administrator), unless listed in APPROVED_ADMINS.", "controls": { "iso27001": ["A.8.2", "A.5.15"], "gdpr": ["Art. 32(1)(b)"], "ai_act": [] } },
120
+ { "id": "vuln.pending_updates", "section": "baseline", "name": "Pending security updates", "os": ["windows", "linux", "macos"], "baseline_keys": ["MAX_PENDING_SECURITY_UPDATES"], "rule": "Security updates offered by the OS vendor but not yet installed <= MAX_PENDING_SECURITY_UPDATES.", "controls": { "iso27001": ["A.8.8"], "gdpr": ["Art. 32(1)(b)", "Art. 32(1)(d)"], "ai_act": [] } },
121
+ { "id": "vuln.outdated_apps", "section": "baseline", "name": "Outdated third-party applications", "os": ["windows", "linux", "macos"], "baseline_keys": ["MAX_OUTDATED_APPS"], "rule": "Installed third-party applications with a newer version available <= MAX_OUTDATED_APPS (Windows: winget; macOS: app versions; Linux: snap/flatpak and packages).", "controls": { "iso27001": ["A.8.8", "A.8.19"], "gdpr": ["Art. 32(1)(b)"], "ai_act": [] } },
122
+ { "id": "vuln.known_vulnerabilities", "section": "baseline", "name": "Known vulnerabilities in installed software", "os": ["windows", "linux", "macos"], "baseline_keys": ["MAX_CRITICAL_HIGH_VULNERABILITIES"], "rule": "Installed software versions matched against an offline copy of the OSV/NVD vulnerability data: critical or high vulnerabilities <= MAX_CRITICAL_HIGH_VULNERABILITIES.", "controls": { "iso27001": ["A.8.8"], "gdpr": ["Art. 32(1)(b)"], "ai_act": [] } },
123
 
124
  { "id": "gdpr.auto_updates", "section": "gdpr", "name": "Automatic security updates", "os": ["windows", "linux", "macos"], "baseline_keys": [], "rule": "Security updates are downloaded and installed automatically.", "controls": { "iso27001": ["A.8.8"], "gdpr": ["Art. 32(1)(b)"], "ai_act": [] } },
125
  { "id": "gdpr.updates_recent", "section": "gdpr", "name": "Security updates installed recently", "os": ["windows", "linux", "macos"], "baseline_keys": ["UPDATES_MAX_AGE_DAYS"], "rule": "Last successful update/package change within UPDATES_MAX_AGE_DAYS days.", "controls": { "iso27001": ["A.8.8"], "gdpr": ["Art. 32(1)(b)", "Art. 32(1)(d)"], "ai_act": [] } },
library/check_guidance.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "library_version": "0.1.0",
3
  "note": "Per-check guidance used to write findings. Fix steps are written for administrators; prefer central management (Group Policy/Intune, MDM, configuration management) over per-device changes. Review by a security professional before use with customers.",
4
  "aliases": {
5
  "firewall.domain.enabled": "firewall.enabled", "firewall.private.enabled": "firewall.enabled", "firewall.public.enabled": "firewall.enabled",
@@ -193,6 +193,7 @@
193
  "why": "An idle device should lock itself so nobody can use it while the owner is away.",
194
  "risk": { "level": "Medium", "reason": "An unlocked, unattended device exposes all the user's data and accounts." },
195
  "fix": {
 
196
  "linux": ["For GNOME: gsettings set org.gnome.desktop.screensaver lock-enabled true, and enforce it for all users with a locked dconf setting in /etc/dconf/db/local.d/."],
197
  "macos": ["System Settings > Lock Screen: set the screen saver and display-off times and 'Require password' = Immediately, or enforce with a configuration profile."]
198
  },
@@ -288,6 +289,57 @@
288
  },
289
  "verify": "Re-run the audit; Disk encryption recovery should be Compliant."
290
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
291
 
292
  "gdpr.auto_updates": {
293
  "why": "Security fixes must be installed automatically so that known vulnerabilities are closed quickly.",
 
1
  {
2
+ "library_version": "0.2.0",
3
  "note": "Per-check guidance used to write findings. Fix steps are written for administrators; prefer central management (Group Policy/Intune, MDM, configuration management) over per-device changes. Review by a security professional before use with customers.",
4
  "aliases": {
5
  "firewall.domain.enabled": "firewall.enabled", "firewall.private.enabled": "firewall.enabled", "firewall.public.enabled": "firewall.enabled",
 
193
  "why": "An idle device should lock itself so nobody can use it while the owner is away.",
194
  "risk": { "level": "Medium", "reason": "An unlocked, unattended device exposes all the user's data and accounts." },
195
  "fix": {
196
+ "windows": ["Set Group Policy: Local Policies > Security Options > Interactive logon: Machine inactivity limit = {SCREEN_LOCK_MAX_SECONDS} seconds, or enforce a password-protected screen saver by Group Policy/Intune."],
197
  "linux": ["For GNOME: gsettings set org.gnome.desktop.screensaver lock-enabled true, and enforce it for all users with a locked dconf setting in /etc/dconf/db/local.d/."],
198
  "macos": ["System Settings > Lock Screen: set the screen saver and display-off times and 'Require password' = Immediately, or enforce with a configuration profile."]
199
  },
 
289
  },
290
  "verify": "Re-run the audit; Disk encryption recovery should be Compliant."
291
  },
292
+ "usb.device_access": {
293
+ "why": "Blocking USB mass storage devices completely is the strongest protection against data leaving on, or malware arriving from, removable drives.",
294
+ "risk": { "level": "Low", "reason": "The device access setting differs from the organisation's agreed USB policy." },
295
+ "fix": {
296
+ "windows": ["To block USB storage completely: Group Policy > Administrative Templates > System > Removable Storage Access > All Removable Storage classes: Deny all access = Enabled, or set the USBSTOR service Start value to 4."],
297
+ "linux": ["To block USB storage completely: echo 'install usb-storage /bin/false' > /etc/modprobe.d/usb-storage.conf, or enable USBGuard with ImplicitPolicyTarget=block."],
298
+ "macos": ["Block or allow external storage with your MDM (Restrictions / device control) or an endpoint DLP product."]
299
+ },
300
+ "verify": "Re-run the audit; USB storage device access should read {USB_DEVICE_ACCESS}."
301
+ },
302
+ "user.account_type": {
303
+ "why": "Day-to-day work under an administrator account lets any malware or mistake change the whole system.",
304
+ "risk": { "level": "High", "reason": "Malware started by the signed-in user runs with full administrator rights." },
305
+ "fix": {
306
+ "windows": ["Make the signed-in user a Standard user (Settings > Accounts > Other users > Change account type, or Remove-LocalGroupMember -SID S-1-5-32-544 -Member <account>) and use a separate approved admin account or LAPS for elevation."],
307
+ "linux": ["Remove the signed-in user from sudo/wheel (gpasswd -d <account> sudo) and use a separate approved admin account."],
308
+ "macos": ["Make the signed-in user a Standard user (System Settings > Users & Groups, or sudo dseditgroup -o edit -d <account> -t user admin) and keep a separate approved admin account."]
309
+ },
310
+ "verify": "Re-run the audit; Signed-in user account type should read Standard."
311
+ },
312
+ "vuln.pending_updates": {
313
+ "why": "Security updates that are offered but not installed leave known, published vulnerabilities open.",
314
+ "risk": { "level": "High", "reason": "Attackers target published vulnerabilities quickly after the fix is released." },
315
+ "fix": {
316
+ "windows": ["Install the pending updates now (Settings > Windows Update > Install all), restart if asked, and check that automatic updates are not paused."],
317
+ "linux": ["Install pending security updates: apt update && apt upgrade (RHEL: dnf upgrade --security), then reboot if a new kernel was installed."],
318
+ "macos": ["Install the pending updates: System Settings > General > Software Update, or softwareupdate -ia, then restart if asked."]
319
+ },
320
+ "verify": "Re-run the audit; pending security updates should be {MAX_PENDING_SECURITY_UPDATES} or fewer."
321
+ },
322
+ "vuln.outdated_apps": {
323
+ "why": "Browsers, office suites, PDF readers and meeting apps are common attack targets and need updates like the OS.",
324
+ "risk": { "level": "Medium", "reason": "Outdated applications contain known vulnerabilities that attackers exploit through documents and web pages." },
325
+ "fix": {
326
+ "windows": ["Update the listed applications (winget upgrade --all, or each app's own updater) and manage updates centrally with Intune or a patch management tool."],
327
+ "linux": ["Update packages and app stores: apt upgrade, snap refresh, flatpak update."],
328
+ "macos": ["Update the listed applications from the App Store or their own updaters (or brew upgrade for Homebrew apps), and manage updates centrally with your MDM."]
329
+ },
330
+ "verify": "Re-run the audit; outdated applications should be {MAX_OUTDATED_APPS} or fewer."
331
+ },
332
+ "vuln.known_vulnerabilities": {
333
+ "why": "Installed software versions with published critical or high vulnerabilities give attackers a ready-made way in.",
334
+ "risk": { "level": "High", "reason": "Critical and high vulnerabilities often allow remote code execution or privilege escalation." },
335
+ "fix": {
336
+ "all": ["Update or remove each listed software package to a version without the listed vulnerabilities; where no fix exists yet, apply the vendor's workaround or restrict the software's use."],
337
+ "windows": ["Use winget upgrade or the vendor's installer to reach a fixed version."],
338
+ "linux": ["Use the package manager to reach a fixed version (apt / dnf / snap / flatpak)."],
339
+ "macos": ["Use the App Store, the vendor's updater or brew upgrade to reach a fixed version."]
340
+ },
341
+ "verify": "Re-run the audit; critical or high vulnerabilities should be {MAX_CRITICAL_HIGH_VULNERABILITIES} or fewer."
342
+ },
343
 
344
  "gdpr.auto_updates": {
345
  "why": "Security fixes must be installed automatically so that known vulnerabilities are closed quickly.",
synthetic/generate_evidence.py CHANGED
@@ -19,7 +19,7 @@ import string
19
  from datetime import datetime, timedelta, timezone
20
 
21
  ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
22
- GENERATOR_VERSION = "0.1.0"
23
 
24
  # Report order per OS, identical to the collectors.
25
  PASSWORD_LOCKOUT = ["password.min_length", "password.history", "password.expiration", "password.min_age",
@@ -36,18 +36,21 @@ ORDER = {
36
  "firewall.domain.enabled", "firewall.domain.inbound", "firewall.domain.outbound",
37
  "firewall.private.enabled", "firewall.private.inbound", "firewall.private.outbound",
38
  "firewall.public.enabled", "firewall.public.inbound", "firewall.public.outbound",
39
- "screen_lock.timeout", "screen_lock.password", "usb.read", "usb.write", "admin.approved", "admin.unauthorized",
40
- "encryption.feature", "encryption.enabled", "encryption.protection", "encryption.recovery"] + GDPR + AIACT + ORG,
 
41
  "linux": PASSWORD_LOCKOUT + [
42
  "malware.antivirus", "malware.service", "malware.signature_updates", "malware.signatures", "malware.on_access",
43
  "firewall.enabled", "firewall.inbound", "firewall.outbound",
44
- "screen_lock.enabled", "screen_lock.timeout", "screen_lock.password", "usb.read", "usb.write",
45
- "admin.approved", "admin.unauthorized", "encryption.enabled", "encryption.protection", "encryption.recovery"] + GDPR + AIACT + ORG,
 
46
  "macos": PASSWORD_LOCKOUT + [
47
  "malware.antivirus", "malware.service", "malware.signatures", "malware.signature_updates", "malware.on_access",
48
  "firewall.enabled", "firewall.inbound", "firewall.outbound",
49
- "screen_lock.timeout", "screen_lock.enabled", "screen_lock.password", "usb.read", "usb.write",
50
- "admin.approved", "admin.unauthorized", "encryption.enabled", "encryption.protection", "encryption.recovery"] + GDPR + AIACT + ORG,
 
51
  }
52
  # Checks that report Error when the collector is not run as administrator/root.
53
  NEEDS_ADMIN = {
@@ -369,6 +372,11 @@ class Device:
369
 
370
  # --- screen lock ------------------------------------------------------------
371
  def c_screen_lock_enabled(self):
 
 
 
 
 
372
  if self.os == "linux" and self.rng.random() < 0.12:
373
  return ("NotApplicable", "no GNOME desktop", "on", "No graphical desktop settings found.")
374
  self._lock_on = self.good(0.15)
@@ -388,10 +396,12 @@ class Device:
388
  if self.os == "linux" and not hasattr(self, "_lock_on"):
389
  return ("NotApplicable", "no GNOME desktop", expected, "No graphical desktop settings found.")
390
  if self.os == "windows":
 
 
391
  if self.good():
392
  if self.rng.random() < 0.5:
393
- secs = self.pick([300, 600, 900])
394
- return self.result(True, f"{secs} seconds (machine inactivity limit)", expected)
395
  return self.result(True, f"screen saver within limit for: {self._win_user()}", expected)
396
  return self.result(False, self.pick(["no machine inactivity limit; no signed-in user to check",
397
  f"no machine inactivity limit; too long or off for: {self._win_user()} (1200s, active=1)",
@@ -400,7 +410,7 @@ class Device:
400
  users = self._desktop_users()
401
  ok = self.good()
402
  return self.result(ok, "within limit" if ok else f"too long for: {users.split(', ')[0]} ({self.pick([1800, 3600, 0])}s)", expected, f"Users checked: {users}")
403
- idle = self.pick([120, 300, 600]) if self.good() else self.pick([1200, 1800, 3600])
404
  delay = self.pick([0, 5, 60, 300])
405
  if not getattr(self, "_lock_on", True):
406
  return ("Non-Compliant", f"{idle} idle, password delay off", expected, "")
@@ -434,9 +444,19 @@ class Device:
434
  return self.result(delay <= 5, f"password after {delay} seconds", "password within 5 seconds")
435
 
436
  # --- USB ------------------------------------------------------------------------
 
 
 
 
 
 
 
 
 
437
  def c_usb_read(self):
438
  expected = self.b("USB_READ").lower()
439
- self._usb_blocked_all = self.rng.random() < 0.08
 
440
  actual = "deny" if self._usb_blocked_all else "allow"
441
  detail = {"windows": "all removable storage denied by policy", "linux": "usb-storage module disabled",
442
  "macos": ""}[self.os] if self._usb_blocked_all else ""
@@ -517,6 +537,60 @@ class Device:
517
  ok = self.good(0.1)
518
  return self.result(ok, f"recovery key present (personal: {'true' if ok else 'false'}, institutional: false)" if ok else "no recovery key", "recovery key present")
519
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
520
  # --- GDPR ----------------------------------------------------------------------------
521
  def c_gdpr_auto_updates(self):
522
  ok = self.good(0.1)
 
19
  from datetime import datetime, timedelta, timezone
20
 
21
  ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
22
+ GENERATOR_VERSION = "0.2.0"
23
 
24
  # Report order per OS, identical to the collectors.
25
  PASSWORD_LOCKOUT = ["password.min_length", "password.history", "password.expiration", "password.min_age",
 
36
  "firewall.domain.enabled", "firewall.domain.inbound", "firewall.domain.outbound",
37
  "firewall.private.enabled", "firewall.private.inbound", "firewall.private.outbound",
38
  "firewall.public.enabled", "firewall.public.inbound", "firewall.public.outbound",
39
+ "screen_lock.enabled", "screen_lock.timeout", "screen_lock.password", "usb.device_access", "usb.read", "usb.write",
40
+ "admin.approved", "admin.unauthorized", "user.account_type",
41
+ "encryption.feature", "encryption.enabled", "encryption.protection", "encryption.recovery", "vuln.pending_updates", "vuln.outdated_apps", "vuln.known_vulnerabilities"] + GDPR + AIACT + ORG,
42
  "linux": PASSWORD_LOCKOUT + [
43
  "malware.antivirus", "malware.service", "malware.signature_updates", "malware.signatures", "malware.on_access",
44
  "firewall.enabled", "firewall.inbound", "firewall.outbound",
45
+ "screen_lock.enabled", "screen_lock.timeout", "screen_lock.password", "usb.device_access", "usb.read", "usb.write",
46
+ "admin.approved", "admin.unauthorized", "user.account_type", "encryption.enabled", "encryption.protection", "encryption.recovery",
47
+ "vuln.pending_updates", "vuln.outdated_apps", "vuln.known_vulnerabilities"] + GDPR + AIACT + ORG,
48
  "macos": PASSWORD_LOCKOUT + [
49
  "malware.antivirus", "malware.service", "malware.signatures", "malware.signature_updates", "malware.on_access",
50
  "firewall.enabled", "firewall.inbound", "firewall.outbound",
51
+ "screen_lock.timeout", "screen_lock.enabled", "screen_lock.password", "usb.device_access", "usb.read", "usb.write",
52
+ "admin.approved", "admin.unauthorized", "user.account_type", "encryption.enabled", "encryption.protection", "encryption.recovery",
53
+ "vuln.pending_updates", "vuln.outdated_apps", "vuln.known_vulnerabilities"] + GDPR + AIACT + ORG,
54
  }
55
  # Checks that report Error when the collector is not run as administrator/root.
56
  NEEDS_ADMIN = {
 
372
 
373
  # --- screen lock ------------------------------------------------------------
374
  def c_screen_lock_enabled(self):
375
+ if self.os == "windows":
376
+ self._lock_on = self.good(0.15)
377
+ if self._lock_on:
378
+ return ("Compliant", self.pick(["machine inactivity limit set", "password-protected screen saver on for all signed-in users"]), "on", "")
379
+ return ("Non-Compliant", self.pick(["no machine inactivity limit; screen saver off", "no machine inactivity limit; no signed-in user to check"]), "on", "")
380
  if self.os == "linux" and self.rng.random() < 0.12:
381
  return ("NotApplicable", "no GNOME desktop", "on", "No graphical desktop settings found.")
382
  self._lock_on = self.good(0.15)
 
396
  if self.os == "linux" and not hasattr(self, "_lock_on"):
397
  return ("NotApplicable", "no GNOME desktop", expected, "No graphical desktop settings found.")
398
  if self.os == "windows":
399
+ if not getattr(self, "_lock_on", True):
400
+ return self.result(False, "no machine inactivity limit; screen saver off", expected)
401
  if self.good():
402
  if self.rng.random() < 0.5:
403
+ secs = self.pick([120, 180, 300]) if self.good(0.1) else self.pick([600, 900, 1200])
404
+ return self.result(secs <= limit, f"{secs} seconds (machine inactivity limit)", expected)
405
  return self.result(True, f"screen saver within limit for: {self._win_user()}", expected)
406
  return self.result(False, self.pick(["no machine inactivity limit; no signed-in user to check",
407
  f"no machine inactivity limit; too long or off for: {self._win_user()} (1200s, active=1)",
 
410
  users = self._desktop_users()
411
  ok = self.good()
412
  return self.result(ok, "within limit" if ok else f"too long for: {users.split(', ')[0]} ({self.pick([1800, 3600, 0])}s)", expected, f"Users checked: {users}")
413
+ idle = self.pick([60, 120, 180]) if self.good() else self.pick([600, 1200, 1800])
414
  delay = self.pick([0, 5, 60, 300])
415
  if not getattr(self, "_lock_on", True):
416
  return ("Non-Compliant", f"{idle} idle, password delay off", expected, "")
 
444
  return self.result(delay <= 5, f"password after {delay} seconds", "password within 5 seconds")
445
 
446
  # --- USB ------------------------------------------------------------------------
447
+ def c_usb_device_access(self):
448
+ expected = self.b("USB_DEVICE_ACCESS").lower()
449
+ self._usb_blocked_all = self.rng.random() < 0.08
450
+ actual = "deny" if self._usb_blocked_all else "allow"
451
+ detail = {"windows": "USB mass storage driver disabled" if self._usb_blocked_all else "",
452
+ "linux": "usb-storage module disabled" if self._usb_blocked_all else "",
453
+ "macos": "external storage blocked by MDM profile" if self._usb_blocked_all else ""}[self.os]
454
+ return self.result(actual == expected, actual, self.b("USB_DEVICE_ACCESS"), detail)
455
+
456
  def c_usb_read(self):
457
  expected = self.b("USB_READ").lower()
458
+ if not hasattr(self, "_usb_blocked_all"):
459
+ self._usb_blocked_all = self.rng.random() < 0.08
460
  actual = "deny" if self._usb_blocked_all else "allow"
461
  detail = {"windows": "all removable storage denied by policy", "linux": "usb-storage module disabled",
462
  "macos": ""}[self.os] if self._usb_blocked_all else ""
 
537
  ok = self.good(0.1)
538
  return self.result(ok, f"recovery key present (personal: {'true' if ok else 'false'}, institutional: false)" if ok else "no recovery key", "recovery key present")
539
 
540
+
541
+ # --- v0.2: signed-in user and vulnerabilities ------------------------------------
542
+ def c_user_account_type(self):
543
+ user = self._desktop_users().split(", ")[0]
544
+ shown = f"{self._domain()}\\{user}" if self.os == "windows" else user
545
+ if self.good(-0.15):
546
+ return ("Compliant", f"Standard ({shown})", "Standard", "")
547
+ return ("Non-Compliant", f"Administrator ({shown})", "Standard", "The signed-in user is a member of the administrators group.")
548
+
549
+ def c_vuln_pending_updates(self):
550
+ limit = self.n("MAX_PENDING_SECURITY_UPDATES")
551
+ expected = f"<= {limit} pending"
552
+ if self.good(-0.05):
553
+ return ("Compliant", "0 pending", expected, "")
554
+ names = {"windows": [f"2026-{self.rng.randint(8, 10):02d} Cumulative Update for Windows (KB50{self.rng.randint(41000, 49999)})",
555
+ f"Security Update for Microsoft Edge (version {self.rng.randint(128, 131)}.0)", ".NET Framework security update",
556
+ "Servicing Stack Update"],
557
+ "linux": ["openssl", "libssh-4", "linux-image-generic", "openssh-server", "sudo", "curl", "libxml2", "python3.12"],
558
+ "macos": [f"macOS {self.os_version.split('.')[0]} security update", "Background Security Improvement", "Safari security update",
559
+ "Command Line Tools security update"]}[self.os]
560
+ n = self.rng.randint(1, 12)
561
+ listed = self.rng.sample(names, min(len(names), self.pick([1, 2, 3])))
562
+ return ("Non-Compliant", f"{n} pending", expected, "Including: " + ", ".join(listed) + ".")
563
+
564
+ def c_vuln_outdated_apps(self):
565
+ limit = self.n("MAX_OUTDATED_APPS")
566
+ expected = f"<= {limit} outdated"
567
+ if self.good(-0.15):
568
+ return ("Compliant", "0 outdated", expected, "")
569
+ catalog = {"windows": ["Google Chrome", "Mozilla Firefox", "Zoom Workplace", "Adobe Acrobat Reader", "7-Zip", "Notepad++", "VLC media player"],
570
+ "linux": ["firefox (snap)", "chromium (snap)", "zoom (flatpak)", "libreoffice", "thunderbird", "code (snap)"],
571
+ "macos": ["Google Chrome", "Zoom", "Microsoft Word", "Slack", "Adobe Acrobat Reader", "Firefox", "VLC"]}[self.os]
572
+ apps = self.rng.sample(catalog, self.pick([1, 2, 3, 4]))
573
+ parts = []
574
+ for app in apps:
575
+ major = self.rng.randint(3, 130)
576
+ parts.append(f"{app} {major}.{self.rng.randint(0, 9)} -> {major + self.pick([0, 1, 2])}.{self.rng.randint(0, 9)}")
577
+ return ("Non-Compliant", f"{len(apps)} outdated", expected, "; ".join(parts) + ".")
578
+
579
+ def c_vuln_known_vulnerabilities(self):
580
+ limit = self.n("MAX_CRITICAL_HIGH_VULNERABILITIES")
581
+ expected = f"<= {limit} critical/high"
582
+ source = f"Matched against offline OSV/NVD data from 2026-{self.rng.randint(9, 10):02d}-{self.rng.randint(1, 28):02d}."
583
+ if self.good(-0.1):
584
+ low = self.pick([0, 0, 1, 2, 3])
585
+ return ("Compliant", "0 critical/high", expected, f"{source} {low} medium/low.")
586
+ software = {"windows": ["Google Chrome", "Adobe Acrobat Reader", "7-Zip", "Zoom Workplace", "Microsoft .NET Runtime", "Notepad++"],
587
+ "linux": ["openssl", "openssh-server", "sudo", "curl", "glibc", "libxml2", "firefox"],
588
+ "macos": ["Google Chrome", "Zoom", "Adobe Acrobat Reader", "OpenSSL (Homebrew)", "Python 3.11 (Homebrew)", "Firefox"]}[self.os]
589
+ hits = self.rng.sample(software, self.pick([1, 1, 2, 3]))
590
+ critical = self.rng.randint(0, len(hits))
591
+ found = [f"{h} (CVE-2026-{self.rng.randint(10000, 49999)}, {'critical' if i < critical else 'high'})" for i, h in enumerate(hits)]
592
+ return ("Non-Compliant", f"{len(hits)} critical/high", expected, f"{source} " + "; ".join(found) + ".")
593
+
594
  # --- GDPR ----------------------------------------------------------------------------
595
  def c_gdpr_auto_updates(self):
596
  ok = self.good(0.1)
synthetic/samples/synthetic-linux-42000126.json CHANGED
@@ -1,10 +1,10 @@
1
  {
2
  "schema_version": "1.0",
3
- "catalog_version": "0.1.0",
4
  "source": {
5
  "kind": "synthetic",
6
  "collector": "linux",
7
- "collector_version": "0.1.0",
8
  "synthetic_seed": 42000126,
9
  "synthetic_profile": "hardened"
10
  },
@@ -35,11 +35,15 @@
35
  "SIGNATURE_MAX_AGE_DAYS": "3",
36
  "MACOS_XPROTECT_MAX_AGE_DAYS": "30",
37
  "FIREWALL_OUTBOUND": "allow",
38
- "SCREEN_LOCK_MAX_SECONDS": "900",
 
39
  "USB_READ": "allow",
40
  "USB_WRITE": "deny",
41
  "APPROVED_ADMINS": "itadmin",
42
  "ALLOW_DISABLED_BUILTIN_ADMIN": "1",
 
 
 
43
  "UPDATES_MAX_AGE_DAYS": "30",
44
  "BACKUP_MAX_AGE_DAYS": "7",
45
  "APPROVED_REMOTE_SERVICES": "",
@@ -197,7 +201,7 @@
197
  "name": "Screen lock timeout",
198
  "status": "Compliant",
199
  "actual": "within limit",
200
- "expected": "<= 900 seconds",
201
  "detail": "Users checked: akaya, jdoe"
202
  },
203
  {
@@ -209,6 +213,14 @@
209
  "expected": "password required",
210
  "detail": "Users checked: akaya, jdoe"
211
  },
 
 
 
 
 
 
 
 
212
  {
213
  "id": "usb.read",
214
  "section": "baseline",
@@ -238,33 +250,68 @@
238
  "section": "baseline",
239
  "name": "Unauthorized employee administrator accounts",
240
  "status": "Non-Compliant",
241
- "actual": "akaya",
242
  "expected": "none"
243
  },
 
 
 
 
 
 
 
 
244
  {
245
  "id": "encryption.enabled",
246
  "section": "baseline",
247
  "name": "Encryption",
248
- "status": "Compliant",
249
- "actual": "root filesystem on LUKS (dm_crypt-0)",
250
  "expected": "system disk encrypted"
251
  },
252
  {
253
  "id": "encryption.protection",
254
  "section": "baseline",
255
  "name": "Disk encryption protection",
256
- "status": "Compliant",
257
- "actual": "LUKS2 aes-xts-plain64 512-bit key",
258
  "expected": "active, strong cipher"
259
  },
260
  {
261
  "id": "encryption.recovery",
262
  "section": "baseline",
263
  "name": "Disk encryption recovery",
264
- "status": "Compliant",
265
- "actual": "2 key slots, 0 unlock tokens",
266
  "expected": "recovery key or second unlock method"
267
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
268
  {
269
  "id": "gdpr.auto_updates",
270
  "section": "gdpr",
@@ -277,10 +324,10 @@
277
  "id": "gdpr.updates_recent",
278
  "section": "gdpr",
279
  "name": "Security updates installed recently",
280
- "status": "Non-Compliant",
281
- "actual": "156 days ago",
282
  "expected": "<= 30 days ago",
283
- "detail": "Last package upgrade: 2026-05-02 11:51:26"
284
  },
285
  {
286
  "id": "gdpr.os_supported",
@@ -295,7 +342,7 @@
295
  "section": "gdpr",
296
  "name": "Security event logging",
297
  "status": "Compliant",
298
- "actual": "auditd running, journal persistent",
299
  "expected": "auditd running"
300
  },
301
  {
@@ -311,16 +358,17 @@
311
  "section": "gdpr",
312
  "name": "Backup configured",
313
  "status": "Compliant",
314
- "actual": "Deja Dup (jdoe)",
315
  "expected": "backup configured"
316
  },
317
  {
318
  "id": "gdpr.backup_recent",
319
  "section": "gdpr",
320
  "name": "Recent backup",
321
- "status": "Compliant",
322
- "actual": "1 days ago",
323
- "expected": "<= 7 days ago"
 
324
  },
325
  {
326
  "id": "gdpr.removable_encryption",
@@ -368,15 +416,16 @@
368
  "section": "aiact",
369
  "name": "AI software inventory",
370
  "status": "Compliant",
371
- "actual": "LM Studio, Alpaca (Ollama client)",
372
- "expected": "inventory taken"
 
373
  },
374
  {
375
  "id": "aiact.unapproved",
376
  "section": "aiact",
377
  "name": "Unapproved AI tools (shadow AI)",
378
  "status": "Non-Compliant",
379
- "actual": "LM Studio, Alpaca (Ollama client)",
380
  "expected": "only: none"
381
  },
382
  {
@@ -384,7 +433,7 @@
384
  "section": "aiact",
385
  "name": "AI system risk classification",
386
  "status": "Pending",
387
- "actual": "LM Studio, Alpaca (Ollama client)",
388
  "expected": "every AI tool classified",
389
  "detail": "Classified by the auditor model (Caveat classifier) in a later step."
390
  },
@@ -410,18 +459,17 @@
410
  "id": "org.ropa",
411
  "section": "org",
412
  "name": "Record of processing activities",
413
- "status": "Non-Compliant",
414
- "actual": "partial",
415
  "expected": "yes"
416
  },
417
  {
418
  "id": "org.dpia",
419
  "section": "org",
420
  "name": "Data protection impact assessment",
421
- "status": "Pending",
422
- "actual": "not answered",
423
- "expected": "yes",
424
- "detail": "Answer ORG_DPIA in organisational.conf."
425
  },
426
  {
427
  "id": "org.breach_procedure",
@@ -467,14 +515,14 @@
467
  "id": "org.ai_transparency",
468
  "section": "org",
469
  "name": "AI transparency to users",
470
- "status": "Compliant",
471
- "actual": "yes",
472
  "expected": "yes"
473
  }
474
  ],
475
  "summary": {
476
  "Compliant": 38,
477
- "Non-Compliant": 8,
478
  "NotApplicable": 2,
479
  "Pending": 3,
480
  "Error": 0
 
1
  {
2
  "schema_version": "1.0",
3
+ "catalog_version": "0.2.0",
4
  "source": {
5
  "kind": "synthetic",
6
  "collector": "linux",
7
+ "collector_version": "0.2.0",
8
  "synthetic_seed": 42000126,
9
  "synthetic_profile": "hardened"
10
  },
 
35
  "SIGNATURE_MAX_AGE_DAYS": "3",
36
  "MACOS_XPROTECT_MAX_AGE_DAYS": "30",
37
  "FIREWALL_OUTBOUND": "allow",
38
+ "SCREEN_LOCK_MAX_SECONDS": "300",
39
+ "USB_DEVICE_ACCESS": "allow",
40
  "USB_READ": "allow",
41
  "USB_WRITE": "deny",
42
  "APPROVED_ADMINS": "itadmin",
43
  "ALLOW_DISABLED_BUILTIN_ADMIN": "1",
44
+ "MAX_PENDING_SECURITY_UPDATES": "0",
45
+ "MAX_OUTDATED_APPS": "0",
46
+ "MAX_CRITICAL_HIGH_VULNERABILITIES": "0",
47
  "UPDATES_MAX_AGE_DAYS": "30",
48
  "BACKUP_MAX_AGE_DAYS": "7",
49
  "APPROVED_REMOTE_SERVICES": "",
 
201
  "name": "Screen lock timeout",
202
  "status": "Compliant",
203
  "actual": "within limit",
204
+ "expected": "<= 300 seconds",
205
  "detail": "Users checked: akaya, jdoe"
206
  },
207
  {
 
213
  "expected": "password required",
214
  "detail": "Users checked: akaya, jdoe"
215
  },
216
+ {
217
+ "id": "usb.device_access",
218
+ "section": "baseline",
219
+ "name": "USB storage device access",
220
+ "status": "Compliant",
221
+ "actual": "allow",
222
+ "expected": "allow"
223
+ },
224
  {
225
  "id": "usb.read",
226
  "section": "baseline",
 
250
  "section": "baseline",
251
  "name": "Unauthorized employee administrator accounts",
252
  "status": "Non-Compliant",
253
+ "actual": "ewagner, rschmit",
254
  "expected": "none"
255
  },
256
+ {
257
+ "id": "user.account_type",
258
+ "section": "baseline",
259
+ "name": "Signed-in user account type",
260
+ "status": "Compliant",
261
+ "actual": "Standard (akaya)",
262
+ "expected": "Standard"
263
+ },
264
  {
265
  "id": "encryption.enabled",
266
  "section": "baseline",
267
  "name": "Encryption",
268
+ "status": "Non-Compliant",
269
+ "actual": "root filesystem not encrypted",
270
  "expected": "system disk encrypted"
271
  },
272
  {
273
  "id": "encryption.protection",
274
  "section": "baseline",
275
  "name": "Disk encryption protection",
276
+ "status": "Non-Compliant",
277
+ "actual": "not encrypted",
278
  "expected": "active, strong cipher"
279
  },
280
  {
281
  "id": "encryption.recovery",
282
  "section": "baseline",
283
  "name": "Disk encryption recovery",
284
+ "status": "Non-Compliant",
285
+ "actual": "not encrypted",
286
  "expected": "recovery key or second unlock method"
287
  },
288
+ {
289
+ "id": "vuln.pending_updates",
290
+ "section": "baseline",
291
+ "name": "Pending security updates",
292
+ "status": "Non-Compliant",
293
+ "actual": "6 pending",
294
+ "expected": "<= 0 pending",
295
+ "detail": "Including: libxml2, curl."
296
+ },
297
+ {
298
+ "id": "vuln.outdated_apps",
299
+ "section": "baseline",
300
+ "name": "Outdated third-party applications",
301
+ "status": "Non-Compliant",
302
+ "actual": "4 outdated",
303
+ "expected": "<= 0 outdated",
304
+ "detail": "chromium (snap) 124.4 -> 124.4; libreoffice 61.1 -> 63.7; zoom (flatpak) 115.3 -> 115.6; thunderbird 122.7 -> 124.5."
305
+ },
306
+ {
307
+ "id": "vuln.known_vulnerabilities",
308
+ "section": "baseline",
309
+ "name": "Known vulnerabilities in installed software",
310
+ "status": "Compliant",
311
+ "actual": "0 critical/high",
312
+ "expected": "<= 0 critical/high",
313
+ "detail": "Matched against offline OSV/NVD data from 2026-09-09. 0 medium/low."
314
+ },
315
  {
316
  "id": "gdpr.auto_updates",
317
  "section": "gdpr",
 
324
  "id": "gdpr.updates_recent",
325
  "section": "gdpr",
326
  "name": "Security updates installed recently",
327
+ "status": "Compliant",
328
+ "actual": "21 days ago",
329
  "expected": "<= 30 days ago",
330
+ "detail": "Last package upgrade: 2026-09-14 03:19:46"
331
  },
332
  {
333
  "id": "gdpr.os_supported",
 
342
  "section": "gdpr",
343
  "name": "Security event logging",
344
  "status": "Compliant",
345
+ "actual": "auditd running, journal volatile",
346
  "expected": "auditd running"
347
  },
348
  {
 
358
  "section": "gdpr",
359
  "name": "Backup configured",
360
  "status": "Compliant",
361
+ "actual": "restic-backup.timer",
362
  "expected": "backup configured"
363
  },
364
  {
365
  "id": "gdpr.backup_recent",
366
  "section": "gdpr",
367
  "name": "Recent backup",
368
+ "status": "Pending",
369
+ "actual": "date not readable",
370
+ "expected": "<= 7 days ago",
371
+ "detail": "Confirm the last backup date in: restic-backup.timer."
372
  },
373
  {
374
  "id": "gdpr.removable_encryption",
 
416
  "section": "aiact",
417
  "name": "AI software inventory",
418
  "status": "Compliant",
419
+ "actual": "Hugging Face models",
420
+ "expected": "inventory taken",
421
+ "detail": "Local models: /home/jdoe/.cache/huggingface/hub (17G)."
422
  },
423
  {
424
  "id": "aiact.unapproved",
425
  "section": "aiact",
426
  "name": "Unapproved AI tools (shadow AI)",
427
  "status": "Non-Compliant",
428
+ "actual": "Hugging Face models",
429
  "expected": "only: none"
430
  },
431
  {
 
433
  "section": "aiact",
434
  "name": "AI system risk classification",
435
  "status": "Pending",
436
+ "actual": "Hugging Face models",
437
  "expected": "every AI tool classified",
438
  "detail": "Classified by the auditor model (Caveat classifier) in a later step."
439
  },
 
459
  "id": "org.ropa",
460
  "section": "org",
461
  "name": "Record of processing activities",
462
+ "status": "Compliant",
463
+ "actual": "yes",
464
  "expected": "yes"
465
  },
466
  {
467
  "id": "org.dpia",
468
  "section": "org",
469
  "name": "Data protection impact assessment",
470
+ "status": "Non-Compliant",
471
+ "actual": "partial",
472
+ "expected": "yes"
 
473
  },
474
  {
475
  "id": "org.breach_procedure",
 
515
  "id": "org.ai_transparency",
516
  "section": "org",
517
  "name": "AI transparency to users",
518
+ "status": "Non-Compliant",
519
+ "actual": "partial",
520
  "expected": "yes"
521
  }
522
  ],
523
  "summary": {
524
  "Compliant": 38,
525
+ "Non-Compliant": 13,
526
  "NotApplicable": 2,
527
  "Pending": 3,
528
  "Error": 0
synthetic/samples/synthetic-macos-42000126.json CHANGED
@@ -1,10 +1,10 @@
1
  {
2
  "schema_version": "1.0",
3
- "catalog_version": "0.1.0",
4
  "source": {
5
  "kind": "synthetic",
6
  "collector": "macos",
7
- "collector_version": "0.1.0",
8
  "synthetic_seed": 42000126,
9
  "synthetic_profile": "hardened"
10
  },
@@ -35,11 +35,15 @@
35
  "SIGNATURE_MAX_AGE_DAYS": "3",
36
  "MACOS_XPROTECT_MAX_AGE_DAYS": "30",
37
  "FIREWALL_OUTBOUND": "allow",
38
- "SCREEN_LOCK_MAX_SECONDS": "900",
 
39
  "USB_READ": "allow",
40
  "USB_WRITE": "deny",
41
  "APPROVED_ADMINS": "itadmin",
42
  "ALLOW_DISABLED_BUILTIN_ADMIN": "1",
 
 
 
43
  "UPDATES_MAX_AGE_DAYS": "30",
44
  "BACKUP_MAX_AGE_DAYS": "7",
45
  "APPROVED_REMOTE_SERVICES": "",
@@ -189,10 +193,9 @@
189
  "id": "screen_lock.timeout",
190
  "section": "baseline",
191
  "name": "Screen lock timeout",
192
- "status": "Compliant",
193
- "actual": "420 seconds",
194
- "expected": "<= 900 seconds",
195
- "detail": "Idle 120s (screen saver/display sleep) + 300s password delay."
196
  },
197
  {
198
  "id": "screen_lock.enabled",
@@ -210,6 +213,15 @@
210
  "actual": "password after 0 seconds",
211
  "expected": "password within 5 seconds"
212
  },
 
 
 
 
 
 
 
 
 
213
  {
214
  "id": "usb.read",
215
  "section": "baseline",
@@ -238,10 +250,19 @@
238
  "id": "admin.unauthorized",
239
  "section": "baseline",
240
  "name": "Unauthorized employee administrator accounts",
241
- "status": "Compliant",
242
- "actual": "none",
243
  "expected": "none"
244
  },
 
 
 
 
 
 
 
 
 
245
  {
246
  "id": "encryption.enabled",
247
  "section": "baseline",
@@ -266,6 +287,32 @@
266
  "actual": "recovery key present (personal: true, institutional: false)",
267
  "expected": "recovery key present"
268
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
269
  {
270
  "id": "gdpr.auto_updates",
271
  "section": "gdpr",
@@ -279,9 +326,9 @@
279
  "section": "gdpr",
280
  "name": "Security updates installed recently",
281
  "status": "Compliant",
282
- "actual": "5 days ago",
283
  "expected": "<= 30 days ago",
284
- "detail": "Last software update: 2026-09-30 06:07:00 +0000"
285
  },
286
  {
287
  "id": "gdpr.os_supported",
@@ -313,16 +360,17 @@
313
  "section": "gdpr",
314
  "name": "Backup configured",
315
  "status": "Compliant",
316
- "actual": "Time Machine",
317
  "expected": "backup configured"
318
  },
319
  {
320
  "id": "gdpr.backup_recent",
321
  "section": "gdpr",
322
  "name": "Recent backup",
323
- "status": "Compliant",
324
- "actual": "7 days ago",
325
- "expected": "<= 7 days ago"
 
326
  },
327
  {
328
  "id": "gdpr.removable_encryption",
@@ -370,48 +418,49 @@
370
  "section": "aiact",
371
  "name": "AI software inventory",
372
  "status": "Compliant",
373
- "actual": "no AI tools found",
374
  "expected": "inventory taken"
375
  },
376
  {
377
  "id": "aiact.unapproved",
378
  "section": "aiact",
379
  "name": "Unapproved AI tools (shadow AI)",
380
- "status": "Compliant",
381
- "actual": "none",
382
  "expected": "only: none"
383
  },
384
  {
385
  "id": "aiact.risk_classification",
386
  "section": "aiact",
387
  "name": "AI system risk classification",
388
- "status": "NotApplicable",
389
- "actual": "no AI tools found",
390
- "expected": "every AI tool classified"
 
391
  },
392
  {
393
  "id": "aiact.os_ai_features",
394
  "section": "aiact",
395
  "name": "Apple Intelligence external integrations restricted",
396
- "status": "Non-Compliant",
397
- "actual": "not restricted",
398
- "expected": "restricted by profile",
399
- "detail": "No profile sets allowExternalIntelligenceIntegrations to false."
400
  },
401
  {
402
  "id": "aiact.log_retention",
403
  "section": "aiact",
404
  "name": "AI usage log retention",
405
- "status": "NotApplicable",
406
- "actual": "no AI tools found",
407
- "expected": ">= 6 months for high-risk AI"
 
408
  },
409
  {
410
  "id": "org.ropa",
411
  "section": "org",
412
  "name": "Record of processing activities",
413
- "status": "Compliant",
414
- "actual": "yes",
415
  "expected": "yes"
416
  },
417
  {
@@ -426,18 +475,17 @@
426
  "id": "org.breach_procedure",
427
  "section": "org",
428
  "name": "Breach response procedure",
429
- "status": "Compliant",
430
- "actual": "yes",
431
  "expected": "yes"
432
  },
433
  {
434
  "id": "org.processor_agreements",
435
  "section": "org",
436
  "name": "Data processing agreements",
437
- "status": "Pending",
438
- "actual": "not answered",
439
- "expected": "yes",
440
- "detail": "Answer ORG_PROCESSOR_AGREEMENTS in organisational.conf."
441
  },
442
  {
443
  "id": "org.ai_register",
@@ -473,10 +521,10 @@
473
  }
474
  ],
475
  "summary": {
476
- "Compliant": 40,
477
- "Non-Compliant": 5,
478
- "NotApplicable": 5,
479
- "Pending": 1,
480
  "Error": 0
481
  }
482
  }
 
1
  {
2
  "schema_version": "1.0",
3
+ "catalog_version": "0.2.0",
4
  "source": {
5
  "kind": "synthetic",
6
  "collector": "macos",
7
+ "collector_version": "0.2.0",
8
  "synthetic_seed": 42000126,
9
  "synthetic_profile": "hardened"
10
  },
 
35
  "SIGNATURE_MAX_AGE_DAYS": "3",
36
  "MACOS_XPROTECT_MAX_AGE_DAYS": "30",
37
  "FIREWALL_OUTBOUND": "allow",
38
+ "SCREEN_LOCK_MAX_SECONDS": "300",
39
+ "USB_DEVICE_ACCESS": "allow",
40
  "USB_READ": "allow",
41
  "USB_WRITE": "deny",
42
  "APPROVED_ADMINS": "itadmin",
43
  "ALLOW_DISABLED_BUILTIN_ADMIN": "1",
44
+ "MAX_PENDING_SECURITY_UPDATES": "0",
45
+ "MAX_OUTDATED_APPS": "0",
46
+ "MAX_CRITICAL_HIGH_VULNERABILITIES": "0",
47
  "UPDATES_MAX_AGE_DAYS": "30",
48
  "BACKUP_MAX_AGE_DAYS": "7",
49
  "APPROVED_REMOTE_SERVICES": "",
 
193
  "id": "screen_lock.timeout",
194
  "section": "baseline",
195
  "name": "Screen lock timeout",
196
+ "status": "Non-Compliant",
197
+ "actual": "60 idle, password delay 300",
198
+ "expected": "<= 300 seconds"
 
199
  },
200
  {
201
  "id": "screen_lock.enabled",
 
213
  "actual": "password after 0 seconds",
214
  "expected": "password within 5 seconds"
215
  },
216
+ {
217
+ "id": "usb.device_access",
218
+ "section": "baseline",
219
+ "name": "USB storage device access",
220
+ "status": "Non-Compliant",
221
+ "actual": "deny",
222
+ "expected": "allow",
223
+ "detail": "external storage blocked by MDM profile"
224
+ },
225
  {
226
  "id": "usb.read",
227
  "section": "baseline",
 
250
  "id": "admin.unauthorized",
251
  "section": "baseline",
252
  "name": "Unauthorized employee administrator accounts",
253
+ "status": "Non-Compliant",
254
+ "actual": "sali, rschmit",
255
  "expected": "none"
256
  },
257
+ {
258
+ "id": "user.account_type",
259
+ "section": "baseline",
260
+ "name": "Signed-in user account type",
261
+ "status": "Non-Compliant",
262
+ "actual": "Administrator (rschmit)",
263
+ "expected": "Standard",
264
+ "detail": "The signed-in user is a member of the administrators group."
265
+ },
266
  {
267
  "id": "encryption.enabled",
268
  "section": "baseline",
 
287
  "actual": "recovery key present (personal: true, institutional: false)",
288
  "expected": "recovery key present"
289
  },
290
+ {
291
+ "id": "vuln.pending_updates",
292
+ "section": "baseline",
293
+ "name": "Pending security updates",
294
+ "status": "Non-Compliant",
295
+ "actual": "9 pending",
296
+ "expected": "<= 0 pending",
297
+ "detail": "Including: Background Security Improvement, macOS 26 security update."
298
+ },
299
+ {
300
+ "id": "vuln.outdated_apps",
301
+ "section": "baseline",
302
+ "name": "Outdated third-party applications",
303
+ "status": "Compliant",
304
+ "actual": "0 outdated",
305
+ "expected": "<= 0 outdated"
306
+ },
307
+ {
308
+ "id": "vuln.known_vulnerabilities",
309
+ "section": "baseline",
310
+ "name": "Known vulnerabilities in installed software",
311
+ "status": "Compliant",
312
+ "actual": "0 critical/high",
313
+ "expected": "<= 0 critical/high",
314
+ "detail": "Matched against offline OSV/NVD data from 2026-10-08. 2 medium/low."
315
+ },
316
  {
317
  "id": "gdpr.auto_updates",
318
  "section": "gdpr",
 
326
  "section": "gdpr",
327
  "name": "Security updates installed recently",
328
  "status": "Compliant",
329
+ "actual": "15 days ago",
330
  "expected": "<= 30 days ago",
331
+ "detail": "Last software update: 2026-09-20 07:47:00 +0000"
332
  },
333
  {
334
  "id": "gdpr.os_supported",
 
360
  "section": "gdpr",
361
  "name": "Backup configured",
362
  "status": "Compliant",
363
+ "actual": "bzserv",
364
  "expected": "backup configured"
365
  },
366
  {
367
  "id": "gdpr.backup_recent",
368
  "section": "gdpr",
369
  "name": "Recent backup",
370
+ "status": "Pending",
371
+ "actual": "date not readable",
372
+ "expected": "<= 7 days ago",
373
+ "detail": "Confirm the last backup date in bzserv."
374
  },
375
  {
376
  "id": "gdpr.removable_encryption",
 
418
  "section": "aiact",
419
  "name": "AI software inventory",
420
  "status": "Compliant",
421
+ "actual": "Claude",
422
  "expected": "inventory taken"
423
  },
424
  {
425
  "id": "aiact.unapproved",
426
  "section": "aiact",
427
  "name": "Unapproved AI tools (shadow AI)",
428
+ "status": "Non-Compliant",
429
+ "actual": "Claude",
430
  "expected": "only: none"
431
  },
432
  {
433
  "id": "aiact.risk_classification",
434
  "section": "aiact",
435
  "name": "AI system risk classification",
436
+ "status": "Pending",
437
+ "actual": "Claude",
438
+ "expected": "every AI tool classified",
439
+ "detail": "Classified by the auditor model (Caveat classifier) in a later step."
440
  },
441
  {
442
  "id": "aiact.os_ai_features",
443
  "section": "aiact",
444
  "name": "Apple Intelligence external integrations restricted",
445
+ "status": "Compliant",
446
+ "actual": "restricted by profile",
447
+ "expected": "restricted by profile"
 
448
  },
449
  {
450
  "id": "aiact.log_retention",
451
  "section": "aiact",
452
  "name": "AI usage log retention",
453
+ "status": "Pending",
454
+ "actual": "depends on classification",
455
+ "expected": ">= 6 months for high-risk AI",
456
+ "detail": "Required only if a tool is classified high-risk."
457
  },
458
  {
459
  "id": "org.ropa",
460
  "section": "org",
461
  "name": "Record of processing activities",
462
+ "status": "Non-Compliant",
463
+ "actual": "partial",
464
  "expected": "yes"
465
  },
466
  {
 
475
  "id": "org.breach_procedure",
476
  "section": "org",
477
  "name": "Breach response procedure",
478
+ "status": "Non-Compliant",
479
+ "actual": "partial",
480
  "expected": "yes"
481
  },
482
  {
483
  "id": "org.processor_agreements",
484
  "section": "org",
485
  "name": "Data processing agreements",
486
+ "status": "Compliant",
487
+ "actual": "yes",
488
+ "expected": "yes"
 
489
  },
490
  {
491
  "id": "org.ai_register",
 
521
  }
522
  ],
523
  "summary": {
524
+ "Compliant": 38,
525
+ "Non-Compliant": 12,
526
+ "NotApplicable": 3,
527
+ "Pending": 3,
528
  "Error": 0
529
  }
530
  }
synthetic/samples/synthetic-windows-42000126.json CHANGED
@@ -1,10 +1,10 @@
1
  {
2
  "schema_version": "1.0",
3
- "catalog_version": "0.1.0",
4
  "source": {
5
  "kind": "synthetic",
6
  "collector": "windows",
7
- "collector_version": "0.1.0",
8
  "synthetic_seed": 42000126,
9
  "synthetic_profile": "hardened"
10
  },
@@ -35,11 +35,15 @@
35
  "SIGNATURE_MAX_AGE_DAYS": "3",
36
  "MACOS_XPROTECT_MAX_AGE_DAYS": "30",
37
  "FIREWALL_OUTBOUND": "allow",
38
- "SCREEN_LOCK_MAX_SECONDS": "900",
 
39
  "USB_READ": "allow",
40
  "USB_WRITE": "deny",
41
  "APPROVED_ADMINS": "itadmin",
42
  "ALLOW_DISABLED_BUILTIN_ADMIN": "1",
 
 
 
43
  "UPDATES_MAX_AGE_DAYS": "30",
44
  "BACKUP_MAX_AGE_DAYS": "7",
45
  "APPROVED_REMOTE_SERVICES": "",
@@ -240,13 +244,21 @@
240
  "expected": "allow",
241
  "detail": "Not configured: Windows default (Allow) applies."
242
  },
 
 
 
 
 
 
 
 
243
  {
244
  "id": "screen_lock.timeout",
245
  "section": "baseline",
246
  "name": "Screen lock timeout",
247
  "status": "Compliant",
248
- "actual": "300 seconds (machine inactivity limit)",
249
- "expected": "<= 900 seconds"
250
  },
251
  {
252
  "id": "screen_lock.password",
@@ -256,6 +268,14 @@
256
  "actual": "screen saver requires sign-in for all signed-in users",
257
  "expected": "sign-in required to unlock"
258
  },
 
 
 
 
 
 
 
 
259
  {
260
  "id": "usb.read",
261
  "section": "baseline",
@@ -268,16 +288,17 @@
268
  "id": "usb.write",
269
  "section": "baseline",
270
  "name": "USB storage write",
271
- "status": "Non-Compliant",
272
- "actual": "allow",
273
- "expected": "deny"
 
274
  },
275
  {
276
  "id": "admin.approved",
277
  "section": "baseline",
278
  "name": "Approved IT administrator",
279
  "status": "Compliant",
280
- "actual": "FABRIKAM\\itadmin",
281
  "expected": "itadmin"
282
  },
283
  {
@@ -288,6 +309,14 @@
288
  "actual": "none",
289
  "expected": "none"
290
  },
 
 
 
 
 
 
 
 
291
  {
292
  "id": "encryption.feature",
293
  "section": "baseline",
@@ -320,6 +349,31 @@
320
  "actual": "key protectors: Tpm, RecoveryPassword",
321
  "expected": "recovery password present"
322
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
323
  {
324
  "id": "gdpr.auto_updates",
325
  "section": "gdpr",
@@ -332,10 +386,10 @@
332
  "id": "gdpr.updates_recent",
333
  "section": "gdpr",
334
  "name": "Security updates installed recently",
335
- "status": "Non-Compliant",
336
- "actual": "63 days ago",
337
  "expected": "<= 30 days ago",
338
- "detail": "Last update: 2026-05 Cumulative Update for Windows 11 (2026-08-03)"
339
  },
340
  {
341
  "id": "gdpr.os_supported",
@@ -383,7 +437,7 @@
383
  "section": "gdpr",
384
  "name": "Removable media encryption",
385
  "status": "Compliant",
386
- "actual": "BitLocker To Go required before writing",
387
  "expected": "no unencrypted writes"
388
  },
389
  {
@@ -399,7 +453,7 @@
399
  "section": "gdpr",
400
  "name": "Remote access services restricted",
401
  "status": "Non-Compliant",
402
- "actual": "ssh",
403
  "expected": "only: none"
404
  },
405
  {
@@ -407,7 +461,7 @@
407
  "section": "gdpr",
408
  "name": "Diagnostic data minimised",
409
  "status": "Compliant",
410
- "actual": "AllowTelemetry=0 (policy)",
411
  "expected": "required diagnostic data only (0-1)"
412
  },
413
  {
@@ -424,16 +478,16 @@
424
  "section": "aiact",
425
  "name": "AI software inventory",
426
  "status": "Compliant",
427
- "actual": "Ollama",
428
  "expected": "inventory taken",
429
- "detail": "Local models: C:\\Users\\jdoe\\.ollama\\models (2 GB)."
430
  },
431
  {
432
  "id": "aiact.unapproved",
433
  "section": "aiact",
434
  "name": "Unapproved AI tools (shadow AI)",
435
  "status": "Non-Compliant",
436
- "actual": "Ollama",
437
  "expected": "only: none"
438
  },
439
  {
@@ -441,7 +495,7 @@
441
  "section": "aiact",
442
  "name": "AI system risk classification",
443
  "status": "Pending",
444
- "actual": "Ollama",
445
  "expected": "every AI tool classified",
446
  "detail": "Classified by the auditor model (Caveat classifier) in a later step."
447
  },
@@ -449,10 +503,10 @@
449
  "id": "aiact.os_ai_features",
450
  "section": "aiact",
451
  "name": "Windows Recall / Copilot data analysis disabled",
452
- "status": "Compliant",
453
- "actual": "Recall disabled by policy",
454
  "expected": "disabled by policy",
455
- "detail": "DisableAIDataAnalysis=1; AllowRecallEnablement=0; TurnOffWindowsCopilot="
456
  },
457
  {
458
  "id": "aiact.log_retention",
@@ -467,8 +521,8 @@
467
  "id": "org.ropa",
468
  "section": "org",
469
  "name": "Record of processing activities",
470
- "status": "Non-Compliant",
471
- "actual": "partial",
472
  "expected": "yes"
473
  },
474
  {
@@ -515,24 +569,25 @@
515
  "id": "org.human_oversight",
516
  "section": "org",
517
  "name": "Human oversight for high-risk AI",
518
- "status": "Non-Compliant",
519
- "actual": "partial",
520
  "expected": "yes"
521
  },
522
  {
523
  "id": "org.ai_transparency",
524
  "section": "org",
525
  "name": "AI transparency to users",
526
- "status": "Compliant",
527
- "actual": "yes",
528
- "expected": "yes"
 
529
  }
530
  ],
531
  "summary": {
532
- "Compliant": 47,
533
- "Non-Compliant": 7,
534
- "NotApplicable": 1,
535
- "Pending": 3,
536
  "Error": 0
537
  }
538
  }
 
1
  {
2
  "schema_version": "1.0",
3
+ "catalog_version": "0.2.0",
4
  "source": {
5
  "kind": "synthetic",
6
  "collector": "windows",
7
+ "collector_version": "0.2.0",
8
  "synthetic_seed": 42000126,
9
  "synthetic_profile": "hardened"
10
  },
 
35
  "SIGNATURE_MAX_AGE_DAYS": "3",
36
  "MACOS_XPROTECT_MAX_AGE_DAYS": "30",
37
  "FIREWALL_OUTBOUND": "allow",
38
+ "SCREEN_LOCK_MAX_SECONDS": "300",
39
+ "USB_DEVICE_ACCESS": "allow",
40
  "USB_READ": "allow",
41
  "USB_WRITE": "deny",
42
  "APPROVED_ADMINS": "itadmin",
43
  "ALLOW_DISABLED_BUILTIN_ADMIN": "1",
44
+ "MAX_PENDING_SECURITY_UPDATES": "0",
45
+ "MAX_OUTDATED_APPS": "0",
46
+ "MAX_CRITICAL_HIGH_VULNERABILITIES": "0",
47
  "UPDATES_MAX_AGE_DAYS": "30",
48
  "BACKUP_MAX_AGE_DAYS": "7",
49
  "APPROVED_REMOTE_SERVICES": "",
 
244
  "expected": "allow",
245
  "detail": "Not configured: Windows default (Allow) applies."
246
  },
247
+ {
248
+ "id": "screen_lock.enabled",
249
+ "section": "baseline",
250
+ "name": "Screen lock",
251
+ "status": "Compliant",
252
+ "actual": "machine inactivity limit set",
253
+ "expected": "on"
254
+ },
255
  {
256
  "id": "screen_lock.timeout",
257
  "section": "baseline",
258
  "name": "Screen lock timeout",
259
  "status": "Compliant",
260
+ "actual": "180 seconds (machine inactivity limit)",
261
+ "expected": "<= 300 seconds"
262
  },
263
  {
264
  "id": "screen_lock.password",
 
268
  "actual": "screen saver requires sign-in for all signed-in users",
269
  "expected": "sign-in required to unlock"
270
  },
271
+ {
272
+ "id": "usb.device_access",
273
+ "section": "baseline",
274
+ "name": "USB storage device access",
275
+ "status": "Compliant",
276
+ "actual": "allow",
277
+ "expected": "allow"
278
+ },
279
  {
280
  "id": "usb.read",
281
  "section": "baseline",
 
288
  "id": "usb.write",
289
  "section": "baseline",
290
  "name": "USB storage write",
291
+ "status": "Compliant",
292
+ "actual": "deny",
293
+ "expected": "deny",
294
+ "detail": "removable disk write denied by policy"
295
  },
296
  {
297
  "id": "admin.approved",
298
  "section": "baseline",
299
  "name": "Approved IT administrator",
300
  "status": "Compliant",
301
+ "actual": "CONTOSO\\itadmin",
302
  "expected": "itadmin"
303
  },
304
  {
 
309
  "actual": "none",
310
  "expected": "none"
311
  },
312
+ {
313
+ "id": "user.account_type",
314
+ "section": "baseline",
315
+ "name": "Signed-in user account type",
316
+ "status": "Compliant",
317
+ "actual": "Standard (CONTOSO\\lmuller)",
318
+ "expected": "Standard"
319
+ },
320
  {
321
  "id": "encryption.feature",
322
  "section": "baseline",
 
349
  "actual": "key protectors: Tpm, RecoveryPassword",
350
  "expected": "recovery password present"
351
  },
352
+ {
353
+ "id": "vuln.pending_updates",
354
+ "section": "baseline",
355
+ "name": "Pending security updates",
356
+ "status": "Compliant",
357
+ "actual": "0 pending",
358
+ "expected": "<= 0 pending"
359
+ },
360
+ {
361
+ "id": "vuln.outdated_apps",
362
+ "section": "baseline",
363
+ "name": "Outdated third-party applications",
364
+ "status": "Compliant",
365
+ "actual": "0 outdated",
366
+ "expected": "<= 0 outdated"
367
+ },
368
+ {
369
+ "id": "vuln.known_vulnerabilities",
370
+ "section": "baseline",
371
+ "name": "Known vulnerabilities in installed software",
372
+ "status": "Compliant",
373
+ "actual": "0 critical/high",
374
+ "expected": "<= 0 critical/high",
375
+ "detail": "Matched against offline OSV/NVD data from 2026-09-10. 1 medium/low."
376
+ },
377
  {
378
  "id": "gdpr.auto_updates",
379
  "section": "gdpr",
 
386
  "id": "gdpr.updates_recent",
387
  "section": "gdpr",
388
  "name": "Security updates installed recently",
389
+ "status": "Compliant",
390
+ "actual": "28 days ago",
391
  "expected": "<= 30 days ago",
392
+ "detail": "Last update: 2026-02 Cumulative Update for Windows 11 (2026-09-07)"
393
  },
394
  {
395
  "id": "gdpr.os_supported",
 
437
  "section": "gdpr",
438
  "name": "Removable media encryption",
439
  "status": "Compliant",
440
+ "actual": "writing to USB storage blocked",
441
  "expected": "no unencrypted writes"
442
  },
443
  {
 
453
  "section": "gdpr",
454
  "name": "Remote access services restricted",
455
  "status": "Non-Compliant",
456
+ "actual": "smb",
457
  "expected": "only: none"
458
  },
459
  {
 
461
  "section": "gdpr",
462
  "name": "Diagnostic data minimised",
463
  "status": "Compliant",
464
+ "actual": "AllowTelemetry=0 (Settings)",
465
  "expected": "required diagnostic data only (0-1)"
466
  },
467
  {
 
478
  "section": "aiact",
479
  "name": "AI software inventory",
480
  "status": "Compliant",
481
+ "actual": "Cursor, Claude, Ollama",
482
  "expected": "inventory taken",
483
+ "detail": "Local AI service listening on port 11434. Local models: C:\\Users\\jdoe\\.ollama\\models (51 GB)."
484
  },
485
  {
486
  "id": "aiact.unapproved",
487
  "section": "aiact",
488
  "name": "Unapproved AI tools (shadow AI)",
489
  "status": "Non-Compliant",
490
+ "actual": "Cursor, Claude, Ollama",
491
  "expected": "only: none"
492
  },
493
  {
 
495
  "section": "aiact",
496
  "name": "AI system risk classification",
497
  "status": "Pending",
498
+ "actual": "Cursor, Claude, Ollama",
499
  "expected": "every AI tool classified",
500
  "detail": "Classified by the auditor model (Caveat classifier) in a later step."
501
  },
 
503
  "id": "aiact.os_ai_features",
504
  "section": "aiact",
505
  "name": "Windows Recall / Copilot data analysis disabled",
506
+ "status": "NotApplicable",
507
+ "actual": "Recall not available on this device",
508
  "expected": "disabled by policy",
509
+ "detail": "DisableAIDataAnalysis=; AllowRecallEnablement=; TurnOffWindowsCopilot="
510
  },
511
  {
512
  "id": "aiact.log_retention",
 
521
  "id": "org.ropa",
522
  "section": "org",
523
  "name": "Record of processing activities",
524
+ "status": "Compliant",
525
+ "actual": "yes",
526
  "expected": "yes"
527
  },
528
  {
 
569
  "id": "org.human_oversight",
570
  "section": "org",
571
  "name": "Human oversight for high-risk AI",
572
+ "status": "Compliant",
573
+ "actual": "yes",
574
  "expected": "yes"
575
  },
576
  {
577
  "id": "org.ai_transparency",
578
  "section": "org",
579
  "name": "AI transparency to users",
580
+ "status": "Pending",
581
+ "actual": "not answered",
582
+ "expected": "yes",
583
+ "detail": "Answer ORG_AI_TRANSPARENCY in organisational.conf."
584
  }
585
  ],
586
  "summary": {
587
+ "Compliant": 55,
588
+ "Non-Compliant": 3,
589
+ "NotApplicable": 2,
590
+ "Pending": 4,
591
  "Error": 0
592
  }
593
  }
training/build_dataset.py CHANGED
@@ -24,7 +24,7 @@ import random
24
  import re
25
 
26
  ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
27
- DATASET_VERSION = "0.1.0"
28
  SYSTEM_PROMPT = ("You are the Devseis endpoint auditor. You write audit findings from collected evidence for "
29
  "ISO 27001, GDPR and the EU AI Act. Use only the evidence and reference material in the request. "
30
  "Never invent values, dates, versions, account names or tools. Reply with JSON only.")
 
24
  import re
25
 
26
  ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
27
+ DATASET_VERSION = "0.2.0"
28
  SYSTEM_PROMPT = ("You are the Devseis endpoint auditor. You write audit findings from collected evidence for "
29
  "ISO 27001, GDPR and the EU AI Act. Use only the evidence and reference material in the request. "
30
  "Never invent values, dates, versions, account names or tools. Reply with JSON only.")
training/evaluate.py ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Evaluate the auditor model on held-out test examples, fully offline.
3
+
4
+ Measures, per task:
5
+ - valid JSON the reply parses as JSON
6
+ - grounded passes training/check_faithfulness.py (the same check the app uses)
7
+ - fields match finding: check_id, status and risk level equal the target;
8
+ summary: score and top gaps equal the target; ai: tools and approval flags equal the target
9
+ Run it for the base model and for the fine-tuned adapter to compare.
10
+
11
+ Usage:
12
+ training/.venv/bin/python training/evaluate.py --count 30 # base model
13
+ training/.venv/bin/python training/evaluate.py --count 30 --adapter training/models/auditor-lora/final
14
+ """
15
+ import argparse
16
+ import json
17
+ import os
18
+ import random
19
+ import sys
20
+ import time
21
+
22
+ os.environ["HF_HUB_OFFLINE"] = "1"
23
+ os.environ["TRANSFORMERS_OFFLINE"] = "1"
24
+
25
+ import torch # noqa: E402
26
+ from transformers import AutoModelForCausalLM, AutoTokenizer # noqa: E402
27
+
28
+ ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
29
+ sys.path.insert(0, os.path.join(ROOT, "training"))
30
+ from check_faithfulness import check as grounding_problems # noqa: E402
31
+
32
+
33
+ def pick(examples, count, seed):
34
+ """Balanced sample: findings across statuses, plus summaries and AI classifications."""
35
+ rng = random.Random(seed)
36
+ groups = {}
37
+ for item in examples:
38
+ meta = item["meta"]
39
+ groups.setdefault((meta["task"], meta.get("status", "")), []).append(item)
40
+ for items in groups.values():
41
+ rng.shuffle(items)
42
+ chosen, keys = [], sorted(groups)
43
+ while len(chosen) < count and any(groups[k] for k in keys):
44
+ for key in keys:
45
+ if groups[key] and len(chosen) < count:
46
+ chosen.append(groups[key].pop())
47
+ return chosen
48
+
49
+
50
+ def fields_match(task, answer, target):
51
+ if task == "finding":
52
+ return (answer.get("check_id") == target["check_id"] and answer.get("status") == target["status"]
53
+ and (answer.get("risk") or {}).get("level") == target["risk"]["level"])
54
+ if task == "summary":
55
+ return (answer.get("score") == target["score"]
56
+ and [g.get("check_id") for g in answer.get("top_gaps", [])] == [g["check_id"] for g in target["top_gaps"]])
57
+ return ([(t.get("tool"), t.get("approved")) for t in answer.get("tools", [])]
58
+ == [(t["tool"], t["approved"]) for t in target["tools"]])
59
+
60
+
61
+ def main():
62
+ parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
63
+ parser.add_argument("--base", default=os.path.join(ROOT, "training", "models", "Qwen2.5-0.5B-Instruct"))
64
+ parser.add_argument("--adapter", help="LoRA adapter folder (omit to evaluate the base model)")
65
+ parser.add_argument("--data", default=os.path.join(ROOT, "training", "out", "test.jsonl"))
66
+ parser.add_argument("--count", type=int, default=30)
67
+ parser.add_argument("--max-new-tokens", type=int, default=700)
68
+ parser.add_argument("--seed", type=int, default=5)
69
+ parser.add_argument("--save", help="write every reply to this JSONL file")
70
+ args = parser.parse_args()
71
+
72
+ torch.set_num_threads(os.cpu_count())
73
+ tokenizer = AutoTokenizer.from_pretrained(args.base, local_files_only=True)
74
+ model = AutoModelForCausalLM.from_pretrained(args.base, local_files_only=True, torch_dtype=torch.float32,
75
+ attn_implementation="eager")
76
+ if args.adapter:
77
+ from peft import PeftModel
78
+ model = PeftModel.from_pretrained(model, args.adapter)
79
+ model = model.merge_and_unload()
80
+ model.eval()
81
+
82
+ with open(args.data, encoding="utf-8") as handle:
83
+ examples = pick([json.loads(line) for line in handle], args.count, args.seed)
84
+
85
+ totals = {}
86
+ saved = []
87
+ started = time.time()
88
+ for number, example in enumerate(examples, 1):
89
+ task = example["meta"]["task"]
90
+ prompt_ids = tokenizer.apply_chat_template(example["messages"][:-1], add_generation_prompt=True, return_tensors="pt")
91
+ with torch.no_grad():
92
+ output = model.generate(prompt_ids, max_new_tokens=args.max_new_tokens, do_sample=False,
93
+ pad_token_id=tokenizer.eos_token_id)
94
+ reply = tokenizer.decode(output[0, prompt_ids.shape[1]:], skip_special_tokens=True).strip()
95
+ target = json.loads(example["messages"][-1]["content"])
96
+ row = totals.setdefault(task, {"n": 0, "json": 0, "grounded": 0, "fields": 0})
97
+ row["n"] += 1
98
+ try:
99
+ answer = json.loads(reply)
100
+ row["json"] += 1
101
+ graded = {"messages": example["messages"][:-1] + [{"role": "assistant", "content": reply}]}
102
+ if not grounding_problems(graded):
103
+ row["grounded"] += 1
104
+ if fields_match(task, answer, target):
105
+ row["fields"] += 1
106
+ except json.JSONDecodeError:
107
+ pass
108
+ saved.append({"task": task, "meta": example["meta"], "reply": reply})
109
+ print(f"[{number}/{len(examples)}] {task:<18} {time.time() - started:6.0f}s", flush=True)
110
+
111
+ label = f"adapter {args.adapter}" if args.adapter else "base model"
112
+ print(f"\nResults for {label} on {len(examples)} test examples:")
113
+ print(f"{'task':<18} {'n':>3} {'valid JSON':>11} {'grounded':>9} {'fields match':>13}")
114
+ for task, row in sorted(totals.items()):
115
+ n = row["n"]
116
+ print(f"{task:<18} {n:>3} {row['json'] / n:>10.0%} {row['grounded'] / n:>9.0%} {row['fields'] / n:>13.0%}")
117
+ if args.save:
118
+ with open(args.save, "w", encoding="utf-8") as handle:
119
+ for item in saved:
120
+ handle.write(json.dumps(item, ensure_ascii=False) + "\n")
121
+
122
+
123
+ if __name__ == "__main__":
124
+ main()
training/merge_lora.py ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Merge the trained LoRA adapter into the base model, offline.
3
+
4
+ The merged model (safetensors, float16) is the input for the WebLLM conversion
5
+ (mlc_llm convert_weight / gen_config), see training/README notes in the main README.
6
+
7
+ Usage:
8
+ training/.venv/bin/python training/merge_lora.py \
9
+ --adapter training/models/auditor-lora/final --out training/models/devseis-auditor-0.5b
10
+ """
11
+ import argparse
12
+ import os
13
+
14
+ os.environ["HF_HUB_OFFLINE"] = "1"
15
+ os.environ["TRANSFORMERS_OFFLINE"] = "1"
16
+
17
+ import torch # noqa: E402
18
+ from peft import PeftModel # noqa: E402
19
+ from transformers import AutoModelForCausalLM, AutoTokenizer # noqa: E402
20
+
21
+ ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
22
+
23
+
24
+ def main():
25
+ parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
26
+ parser.add_argument("--base", default=os.path.join(ROOT, "training", "models", "Qwen2.5-0.5B-Instruct"))
27
+ parser.add_argument("--adapter", default=os.path.join(ROOT, "training", "models", "auditor-lora", "final"))
28
+ parser.add_argument("--out", default=os.path.join(ROOT, "training", "models", "devseis-auditor-0.5b"))
29
+ args = parser.parse_args()
30
+
31
+ tokenizer = AutoTokenizer.from_pretrained(args.base, local_files_only=True)
32
+ model = AutoModelForCausalLM.from_pretrained(args.base, local_files_only=True, torch_dtype=torch.float32,
33
+ attn_implementation="eager")
34
+ model = PeftModel.from_pretrained(model, args.adapter).merge_and_unload()
35
+ model = model.to(torch.float16)
36
+ model.save_pretrained(args.out, safe_serialization=True)
37
+ tokenizer.save_pretrained(args.out)
38
+ print(f"Merged model saved to {args.out}")
39
+
40
+
41
+ if __name__ == "__main__":
42
+ main()
training/train_lora.py CHANGED
@@ -29,6 +29,9 @@ from transformers import AutoModelForCausalLM, AutoTokenizer # noqa: E402
29
  ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
30
  DEFAULT_BASE = os.path.join(ROOT, "training", "models", "Qwen2.5-0.5B-Instruct")
31
  LORA_TARGETS = ["q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj"]
 
 
 
32
 
33
 
34
  def load_examples(path):
@@ -140,7 +143,8 @@ def main():
140
  print(f"Train examples: {len(train)} ({len(train_raw) - len(train)} skipped as longer than {args.max_len} tokens), "
141
  f"{tokens:,} tokens; validation: {len(val)}")
142
 
143
- model = AutoModelForCausalLM.from_pretrained(args.base, local_files_only=True, torch_dtype=torch.float32)
 
144
  model.config.use_cache = False
145
  model.gradient_checkpointing_enable()
146
  model.enable_input_require_grads()
@@ -182,6 +186,7 @@ def main():
182
  started = time.time()
183
  step_start = time.time()
184
  running = 0.0
 
185
  micro = state["micro"]
186
  while state["step"] < total_steps:
187
  ids, labels, mask = batch_list[micro % len(batch_list)]
@@ -191,7 +196,17 @@ def main():
191
  micro += 1
192
  if micro % args.grad_accum:
193
  continue
194
- torch.nn.utils.clip_grad_norm_(model.parameters(), 1.0)
 
 
 
 
 
 
 
 
 
 
195
  optimizer.step()
196
  scheduler.step()
197
  optimizer.zero_grad()
@@ -202,10 +217,13 @@ def main():
202
  avg = running / args.grad_accum
203
  running = 0.0
204
  state["history"].append({"step": state["step"], "loss": round(avg, 4), "seconds": round(seconds, 1)})
205
- remaining = (total_steps - state["step"]) * (time.time() - started) / max(len(state["history"]) - 0, 1)
 
 
206
  print(f"step {state['step']}/{total_steps} loss {avg:.4f} {seconds:.1f}s/step ~{remaining / 3600:.1f} h left", flush=True)
207
  if not args.benchmark and state["step"] % args.save_every == 0:
208
  save("last")
 
209
  if not args.benchmark and val and state["step"] % args.eval_every == 0:
210
  val_loss = evaluate(model, val, pad_id, args.batch_size)
211
  state["history"][-1]["val_loss"] = round(val_loss, 4)
 
29
  ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
30
  DEFAULT_BASE = os.path.join(ROOT, "training", "models", "Qwen2.5-0.5B-Instruct")
31
  LORA_TARGETS = ["q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj"]
32
+ # PyTorch 2.2 (the last build for Intel Macs) returns wrong attention results with the "sdpa" kernel when
33
+ # gradients are on and more than one thread is used, which drives training to NaN. "eager" is correct and faster here.
34
+ ATTENTION = "eager"
35
 
36
 
37
  def load_examples(path):
 
143
  print(f"Train examples: {len(train)} ({len(train_raw) - len(train)} skipped as longer than {args.max_len} tokens), "
144
  f"{tokens:,} tokens; validation: {len(val)}")
145
 
146
+ model = AutoModelForCausalLM.from_pretrained(args.base, local_files_only=True, torch_dtype=torch.float32,
147
+ attn_implementation=ATTENTION)
148
  model.config.use_cache = False
149
  model.gradient_checkpointing_enable()
150
  model.enable_input_require_grads()
 
186
  started = time.time()
187
  step_start = time.time()
188
  running = 0.0
189
+ bad_steps = 0
190
  micro = state["micro"]
191
  while state["step"] < total_steps:
192
  ids, labels, mask = batch_list[micro % len(batch_list)]
 
196
  micro += 1
197
  if micro % args.grad_accum:
198
  continue
199
+ grad_norm = torch.nn.utils.clip_grad_norm_(model.parameters(), 1.0)
200
+ if not torch.isfinite(grad_norm):
201
+ # Never apply a NaN/inf update: it would destroy every weight.
202
+ optimizer.zero_grad()
203
+ running = 0.0
204
+ bad_steps += 1
205
+ print(f"skipped a step with a non-finite gradient ({bad_steps} in a row)", flush=True)
206
+ if bad_steps >= 3:
207
+ raise SystemExit("Stopping: 3 non-finite gradients in a row. The last good checkpoint is kept.")
208
+ continue
209
+ bad_steps = 0
210
  optimizer.step()
211
  scheduler.step()
212
  optimizer.zero_grad()
 
217
  avg = running / args.grad_accum
218
  running = 0.0
219
  state["history"].append({"step": state["step"], "loss": round(avg, 4), "seconds": round(seconds, 1)})
220
+ # Estimate from recent steps only, so a pause (e.g. the Mac sleeping) does not distort it.
221
+ recent = [h["seconds"] for h in state["history"][-10:] if h["seconds"] < 1800] or [seconds]
222
+ remaining = (total_steps - state["step"]) * sum(recent) / len(recent)
223
  print(f"step {state['step']}/{total_steps} loss {avg:.4f} {seconds:.1f}s/step ~{remaining / 3600:.1f} h left", flush=True)
224
  if not args.benchmark and state["step"] % args.save_every == 0:
225
  save("last")
226
+ save(f"step-{state['step']:04d}") # numbered copy: a later bad save can never overwrite it
227
  if not args.benchmark and val and state["step"] % args.eval_every == 0:
228
  val_loss = evaluate(model, val, pad_id, args.batch_size)
229
  state["history"][-1]["val_loss"] = round(val_loss, 4)