22. Compliance: scans, results and the fix plan
This guide describes Lawliet 1.6.3.b (the current release, a beta: earlier releases are beta. The first stable release will be 2.0.0). Screens, commands and procedures may change in later versions; the usage guide is updated with each release. Check the version your server runs under Settings > Platform or with ./lawliet version, and see the Releases page for what changed.
A compliance scan checks the hosts against the controls of one framework (for example a CIS benchmark) and records, per host and per control, whether the control is met. A scan only reads. It never changes a host. Fixing what a scan found is done through hardening (chapter 26), starting from the scan's Fix plan.
The Compliance area has nine tabs:
| Tab | Chapter |
|---|---|
| Overview (scans, framework registry) | this chapter |
| Schedules, Drift | 23 |
| Heatmap, Trends | 24 |
| Frameworks (scores, manual evidence, signed reports) | 43 |
| Attestations (and exceptions), Reports | 25 |
| Exports (GPO, Ansible, shell bundle) | 44 |
The controls themselves come from the control catalog; the role profiles (lawliet_windows_workstation, lawliet_windows_member_server, lawliet_windows_domain_controller, lawliet_ubuntu_server) are frameworks you scan like any other (chapter 40).
Permissions:
| Task | Permission | Four-eyes |
|---|---|---|
| See scans, results, frameworks | View compliance | - |
| Start a scan | Run scans | no |
| Start hardening from the fix plan | Run hardening | yes, when the run is approved (chapter 26) |
22.1 What the Overview tab shows#
Path: Compliance (the Overview tab is selected).
- Tiles: Frameworks available, Total scans, Average score, Failing controls.
- Run compliance scan form (22.2).
- Active scans: running scans with a progress timeline. The refresh button reloads them.
- Scan history: Framework, Status, Score, C / P / V / NA (compliant / partial / violation / not assessed), Duration, Started. Click a row to open the scan.
- Framework registry: Name, Code, Version, Controls, Platforms. Select on a row chooses that framework in the scan form.
- Shortcut cards to Schedules, Drift, Heatmap and Trends.
How the score is calculated#
score = (passed + 0.5 x partial) / total x 100- Partial earns half credit.
- Not assessed controls (the agent did not answer in time, had no command, or no agent was targeted) stay in the total. A 100% score needs every control assessed and passed.
- Not applicable results are left out, but only where the control can be inapplicable on that host (another role, a version it does not cover, or a feature it needs is absent); anywhere else "not applicable" is scored as not met (40.3).
- Another OS's controls are never in the score: a host is only sent the checks written for its own operating system (22.2, "Which hosts a framework scans"), so a Windows control is neither failed nor not assessed on a Linux host.
- Per-framework scores across hosts (met / not met per requirement) are on the Frameworks tab (chapter 43).
- Attestations and exceptions are reported separately; see chapter 25.
22.2 Procedure: run a scan#
Permission: Run scans. Four-eyes: no. Risk: none to hosts (read-only). Rollback: not needed.
- Open Compliance.
- In Run compliance scan, choose the Framework (or press Select on a row of the Framework registry).
- Under Target choose:
- All agents - every online agent whose OS the framework is for. Hosts of another OS are not scanned and not scored; the scan page lists them under Not scanned, each with the reason (for example "Windows host: CIS Linux Benchmark is for Linux hosts only"); or
- Select agents - tick the hosts you want. Only online agents are listed; the line "N offline agent(s) hidden" tells you how many were left out.
- Press the button. It reads Run scan on all N agents or Run scan on N selected agents (Select agents first while none is ticked).
What you see: the scan appears under Active scans, then moves to Scan history when it finishes. Open it for the results (22.3).
Which hosts a framework scans#
A framework is written for an operating system, and the server matches every scan to it. The host picker applies the same rule before you start: a host the chosen framework is not for is greyed out with the reason beside it (for example "Debian 12 host - this framework covers RHEL-compatible" or "Windows workstation host - this framework covers Windows server"), and Select all online skips it.
- A benchmark for one OS (CIS Ubuntu, the Lawliet Ubuntu/Windows profiles, CIS Windows Server or Workstation, CIS RHEL, CIS Debian/Ubuntu, CIS macOS, STIG): it covers that platform and, where it says so, only those distributions or that Windows edition. CIS Linux runs on any Linux distribution. With All agents, only the hosts it covers are scanned; the others are left out and the Targeted count shows how many were scanned.
- A standard that covers several OSes (NIST CSF, NIST 800-53, ISO 27001, ISO 27701, PCI DSS, HIPAA, SOC 2, GDPR, CIS Controls v8, CMMC): it covers the platforms it has checks for, and each host is sent only the checks for its own OS. These standards ship Linux and Windows checks (22.7), so they cover Linux hosts (any distribution) and Windows hosts; macOS hosts are greyed out. When a standard gains checks for another OS, its hosts are offered after the next start.
- A host that has not reported which Linux distribution it runs, or which Windows edition, is offered, and each check's own guard on the host decides.
A control for another OS is never sent to a host and never counted in a score. If a host the framework does not cover is sent anyway (for example by a script calling the API), the scan is refused with a red message that names each such host and the OS it runs, for example "CIS Windows Server is for Windows server; remove the hosts that run another OS: ws-11.lab (Windows workstation)". The scan record lists every host an all-agents scan left out and why (os_skipped in GET /api/v1/compliance/scans/{id}).
If it fails:
| Message | Cause | Fix |
|---|---|---|
| "No online agents found. Start an agent before running a scan." | No agent has sent a heartbeat recently | Check Environment > Hosts (chapter 10) |
| "No online agents available." (Select agents) | Same | Same |
| Button disabled | No framework chosen, or no host ticked | Complete the form |
| "... is for Ubuntu; remove the hosts that run another OS: host (OS), ..." | A chosen host runs an OS the framework is not written for | Untick the hosts the message names |
| "No online host runs an OS that ... has checks for" | All agents: no online host runs the framework's OS | Pick the framework for your hosts' OS |
| A red message under the form | The server refused the scan (for example permission) | Read the message |
To run the same scan regularly, use a schedule (chapter 23). Administrators can also start a scan from Operations (chapter 39), where Scope: Selected hosts offers the same host picker as this page: tick one host or several, and the scan targets exactly those online hosts. The button stays disabled until at least one host is ticked. A host the framework does not cover - another operating system, another Linux distribution or another Windows edition (22.2, "Which hosts a framework scans") - is greyed out with the reason beside it, Select all online skips it, and changing the framework unticks any host it no longer covers and says so; in all-agents mode the page states how many matching hosts will be scanned and how many are skipped. The pickers grey exactly the hosts the server refuses; a host whose OS the agent has not reported yet is accepted.
22.3 Reading a scan#
Click a scan in Scan history (or a failed scan on the Overview page). The scan page shows:
- Header: framework, status and score. While the scan runs it polls ("Polling...") and shows how many commands are still in flight.
- Scan timed out or Scan failed box when that happened. A timed-out scan keeps the results that arrived; the rest are not assessed.
- Target summary (targeted scans): Mode, Targeted, Responded, and a table per Host with Score, P / F / NA (passed / failed / not assessed) and Total. "N of M targeted agents did not respond" means those hosts' controls count as not assessed.
- Tiles: Total, Compliant, Non-Compliant, Partial, Not assessed, In-Flight. The status line adds "(N of M checks answered)".
- Not assessed, not failed: why checks were not assessed, with a count each - "timed out on the host", "expired before the host ran them", "refused by the host (signature)", "refused by the host after their window (possibly expired)", "could not be run by the agent", "got no answer in the collection window". A check the host never ran is never counted as failed and the fix plan and the planner do not plan fixes for it. A signature refusal that is not an expiry also raises a review item for the host.
- Fix plan (completed scans only; 22.4).
- Score explanation: the formula, the breakdown, and, when attestations apply to this framework, the Measured score next to the Adjusted score with Review attestations and exceptions.
- Control findings: filter buttons All, Failed, Not assessed, Partial, Error, Unsupported, Passed. Columns Control, Category, Severity, Status, Finding. Show all controls and Show all hosts expand long lists.
- Recommended next action: what to do next given the result.
Click a control row to open its detail: status, severity, host, Finding, Remediation and the raw Evidence the agent returned.
Procedure: re-run the checks that got no result#
Permission: Run scans. Four-eyes: no. On a completed scan whose checks timed out, expired, were refused after their window or got no answer, press Re-run remaining N check(s) in the Not assessed, not failed line. What you see: "Queued scan <id> for <n> remaining check(s)"; the new scan runs only those controls on the same hosts. "The scan is still running" or "Every check of this scan was answered; nothing to re-run" (409) means there is nothing to queue yet.
The Recommended next action box points to the Fix plan panel on the same page (22.4) and to the hardening planner; the control detail says "Fix it from the Fix plan on this scan or the hardening planner; the run waits for approval."
A scan made before 1.5.15.4.s that ran on hosts of another OS shows the banner "This scan ran on hosts of another operating system; their results are not valid. Re-run with matching hosts.", naming those hosts. Its Fix plan leaves them out, and a result of an All agents scan is offered for a host only when that host itself failed it. Run the scan again for a valid score.
22.4 Procedure: start hardening from the fix plan#
The Fix plan starts with every host the scan covered whose OS the framework is for, and every fixable control, started as one batch on all of them. A host of another OS (a scan made before 1.5.15.4.s may include one) is never offered: it is listed as Not offered, with the reason (57.3). The procedure below is One host in detail (open it under the Fix plan): one host, with the score projection, the NTLM uses to review and the WinRM ranges.
The Fix plan lists the failed controls that the platform can fix automatically on one host, ranked by how much each raises the score. It tells you how many are fixable here, how many need a manual change, and what the score would become.
Permission: Run hardening. Four-eyes: the run is created without a second signature; it then waits in Hardening as "Pending approval", and approving it is a critical action.
Risk: once approved and executed, the selected fixes change the host's configuration. Rollback: from Hardening, for every step that has a rollback script (chapter 26).
- Open the completed scan.
- Under the Fix plan open One host in detail: score projection, NTLM uses to review, WinRM ranges; on a scan of several hosts, under "Hardening runs on one host. Choose which:", pick the host in Select a host.
- Tick the fixes you want. The text "Fix the N selected and this scan goes from X to Y" shows the effect, and "The N quick ones alone reach X%" when some fixes are quick. Under a fix you may read:
- "Not yet: <reason>" - the fix cannot run here yet (a guard, the order, the audit step, the host's do-not-disrupt baseline, or breakage that must be acknowledged in the planner); its box cannot be ticked. Open the host in Hardening > Planner (chapter 41).
- "Breaks Lawliet access: <what breaks> First: <what to change>" - the change would cut how Lawliet reaches the host (WinRM HTTP 5985, NTLM, a local account, an address filter, a Kerberos-only service). Change that first. To go ahead anyway, tick I accept that the selected changes break how Lawliet reaches this host, as described above. (recorded in the audit trail; refused again if a new dependency appears before approval).
- "May break: <impact>" - the control's catalog impact.
- For NTLM deny fixes: "The audit saw NTLM to these servers. Tick only the ones that must keep NTLM; anything left unticked keeps the deny refused until it moves to Kerberos." Tick those servers (account, program and count are shown), and add others in More servers that may keep NTLM (exceptions, comma separated). Nothing is filled in for you.
- For the WinRM address filter fix: type Addresses WinRM may still accept (a.b.c.d, a.b.c.d-e.f.g.h or a CIDR, comma separated). Include the management hosts and every address the Lawliet server can connect from (a NAT pool, a second server): the host only checks the addresses its recent logons came from. Tick If the host has IPv6 addresses and no IPv6 range is listed, cut IPv6 clients (otherwise the host refuses). only if you mean it.
- Press Start hardening (N) ("Needs approval; every change can be rolled back from Hardening.").
What you see: "Hardening run <id> created. It waits for approval before anything changes on the host." and Open Hardening. Nothing has changed on the host yet.
- Continue in chapter 26: review the steps, then Approve & Execute.
If it fails: "The hardening run could not be created." or a server message naming each refused control and why (the Fix plan runs the planner's checks: guards, order, audit step, baseline - 41.6). No run exists; nothing changed. A control that can lock you out opens the lockout box (26.5).
Before applying a control that can lock you out (key-only SSH, firewall lockdown, disabling the built-in administrator, disk encryption), issue a recovery artifact first (chapter 26).
22.5 Scans are kept: no cancel, no delete#
A scan cannot be cancelled, edited or deleted from the console in this release. This is deliberate: a scan is the record an auditor relies on.
- A scan you started by mistake: let it finish. It only reads the hosts. Ignore it, or run the right scan afterwards; scores and trends use the newest scan of each framework.
- A scan that hangs: it times out by itself. The controls whose answers did not arrive count as not assessed (22.3).
- A scan that should not have run again: disable the schedule that started it (23.1).
22.6 If something looks wrong#
| Symptom | Cause | Fix |
|---|---|---|
| Many controls Not assessed | Agent offline or slow during the scan | Check the host, re-run the scan |
| Unsupported controls | The control has no check for that platform | Attest it manually (chapter 25) |
| Error controls | The check failed to run on the host | Open the control, read the evidence, re-run |
| "No frameworks" in the registry | No framework is registered in the database | Contact [email protected] |
| Score lower than expected | Not-assessed controls count against the score | Make sure every targeted agent is online during the scan |
22.7 Standards that cover several OSes: Windows checks and requirements by OS#
NIST CSF, NIST 800-53, ISO 27001, ISO 27701, PCI DSS, HIPAA, SOC 2, GDPR, CIS Controls v8 and CMMC 2.0 have checks for Linux (shell checks) and, from 1.5.16.s, for Windows. A Windows host scanned against one of them runs the control catalog's own Windows controls (chapter 40) that evidence the standard's requirements - the same checks the Lawliet Windows profiles run, with the same per-host role and version gate. Lawliet adds no mapping of its own:
- NIST 800-53, PCI DSS, GDPR and ISO 27001 have a requirement list in the catalog: a Windows control counts for a requirement when the catalog maps it to that requirement's id.
- The other six have no such list in the catalog: a Windows control counts for a requirement when both are tagged with the same crosswalk topic (for example "password policy").
- A requirement about encryption in transit (for example HIPAA 164.312(e)(1) and (e)(2)(ii), PCI DSS 4.2.1) is never evidenced by a disk-encryption check, on Linux or Windows. On Linux, HIPAA 164.312(e)(1) and (e)(2)(ii) run the same TLS check: one result on the host is the evidence for both, and the Requirements panel says "same check as". That TLS check (also used for NIST CSF PR.DS-2, PCI DSS 4.2.1, SOC 2 CC6.7, ISO 27701 6.4.2) reports Not assessed: no TLS service listening on this host when nothing on the host serves TLS on port 443 - not a failure.
Each Windows control is written for host roles (workstation, member server, domain controller), so coverage is per role. A Windows host whose role the agent reports is sent only the checks for its role; a host whose role is not reported is sent them all, and each check's gate on the host decides. Measured on the shipped catalog (checks a host of that role runs / requirements they cover):
| Standard | Requirements | Workstation | Member server | Domain controller |
|---|---|---|---|---|
| NIST 800-53 | 11 | 203 / 10 | 182 / 9 | 206 / 9 |
| PCI DSS | 19 | 245 / 15 | 212 / 15 | 221 / 15 |
| GDPR | 11 | 479 / 6 | 283 / 5 | 312 / 6 |
| ISO 27001 | 20 | 359 / 13 | 269 / 11 | 303 / 11 |
| NIST CSF | 34 | 206 / 12 | 178 / 12 | 183 / 13 |
| CMMC 2.0 | 10 | 135 / 9 | 155 / 9 | 160 / 9 |
| HIPAA | 18 | 62 / 8 | 102 / 6 | 131 / 7 |
| SOC 2 | 22 | 68 / 9 | 106 / 7 | 121 / 8 |
| CIS Controls v8 | 10 | 120 / 5 | 79 / 4 | 91 / 5 |
| ISO 27701 | 8 | 115 / 4 | 126 / 4 | 131 / 4 |
Procedure: see which checks evidence each requirement#
- Open Compliance > Overview.
- In Framework registry, click Requirements on the standard's row (shown for the standards that run on more than one OS).
What you see: a Requirements by OS panel with every requirement, its Linux column ("shell check", or "no Linux check" for one the scan records as not assessed) and its Windows column (the number of checks; click it for their ids, names, the roles each runs on - WS workstation, MS member server, DC domain controller - and whether the catalog links it by the requirement's own id or by a crosswalk topic; or "no Windows check"). A requirement whose checks are all for other roles says so in orange, for example "no check for member servers, domain controllers". The line above the table gives the totals, per role too. Close hides the panel.
The same list is GET /api/v1/compliance/frameworks/{code}/requirements.
What a Windows host's scan shows#
- Each row is one Windows check, under its catalog id (for example
WIN-WS-ACC-NO-MS-ACCOUNTS), with Evidence for and the requirement ids under its name. A Windows host never gets the Linux rows, and a Linux host never gets the Windows rows. - The score of a Windows host is computed over its own Windows rows only. A check the host's gate finds not for it (a domain-controller control on a workstation) is not applicable and is out of the score (22.1).
- Under the counts, No Windows check for N requirement(s): ... lists the requirements no Windows check evidences on any role, and one line per Windows host (with its role) lists the requirements none of that host's own checks evidenced - its role has none, or its gate found them not for its Windows version. A re-run of the remaining checks keeps the list of the scan it re-runs. They are not compliant, not failed and not in the score; evidence them by attestation (chapter 25) or a manual upload (chapter 43).
- An evidence bundle of the scan (chapter 27) keeps the requirement ids on every Windows row and adds one Requirements by OS item: the requirements with no Windows check, per host with its role, and the Windows checks per requirement.
- Framework scores and signed reports (chapter 43) read the Windows rows through the same catalog mappings.
If it looks wrong:
| Symptom | Cause | Fix |
|---|---|---|
| No Requirements button on a standard | The framework row lists one platform: the server has not restarted since the update | Restart the server (sudo ./lawliet restart); the start-up check rewrites the platforms |
| A Windows host shows many controls as not applicable | Checks for other roles (domain controller, member server) are recorded not applicable on a workstation - not sent when the host reports its role, answered by the host's gate otherwise | Expected; they are not in the score |