Repository navigation
Security Baseline Audits
otw audit scores a PC against a security baseline and reports each control as pass, fail or
needing a human decision. Audits are read-only: they never change the machine.
| Id | Title | Rules | Severities |
|---|---|---|---|
disa-stig-v2r7 |
DISA Microsoft Windows 11 STIG V2R7 | 16 | 7 CAT I, 9 CAT II |
cis-win11-ent-v4.0 |
CIS Microsoft Windows 11 Enterprise Benchmark v4.0.0 | 16 | 15 L1, 1 L2 |
ms-baseline-25h2 |
Microsoft Windows 11 Security Baseline (25H2) | 16 | 16 Baseline |
Each rule carries the framework's own control id (a STIG V- number, a CIS section number or a
Microsoft baseline setting name), a short paraphrased title, a severity and at least one source
link. CIS rules carry only the section id and a paraphrased title, never benchmark text.
A rule is checked in one of three ways:
| Rule type | How it is evaluated |
|---|---|
| Catalogue-backed | It names catalogue entries; the audit scans them, read-only |
| Health-check-backed | It names one machine health check. Two STIG rules work this way: V-253257 (Secure Boot) and V-253259 (BitLocker). |
| Manual | Neither; the report marks it Manual for a person to confirm |
otw audit listotw audit run --baseline ms-baseline-25h2
otw audit run --baseline disa-stig-v2r7 --html --out .\stig.html
otw audit run --baseline cis-win11-ent-v4.0 --json --out .\cis.jsonWithout a report format, a text summary prints:
<baseline title> (<baseline id>) on <Windows product> build <build>
Score: <0-100> / 100
<n> rule(s): <n> pass, <n> fail, <n> n/a, <n> manual, <n> unknown.
FAIL [<severity>] <rule id> <rule title>
with one FAIL line per failing rule, for example:
FAIL [Baseline] MSS-Autoplay-TurnOff-AllDrives Baseline turns off Autoplay and blocks AutoRun commands on all drives.
No elevation is needed, but some health checks report Unknown without it. Run the audit from an
elevated terminal for the fullest result.
On the desktop app, Dashboard > Score this machine audits against all three baselines and shows each score. On the Security page, the baseline filter lists only the entries a baseline refers to, so you can apply them. See Desktop App.
| Outcome | Meaning |
|---|---|
| Pass | The control is satisfied |
| Fail | The control is not satisfied: drift, or a failing or warning health check |
| NotApplicable | The control does not apply to this machine (edition, build or hardware) |
| Manual | Needs a human decision: a manual-only rule, or a setting managed by policy |
| Unknown | Could not be determined, for example because it needs elevation |
How catalogue-backed rules are decided:
- A rule with several entries takes the worst result. Not-applicable entries are ignored unless every entry is not applicable.
- A setting that has the wanted value passes, whether you set it or a policy enforces it.
- A setting a policy enforces at a different value fails: a policy is enforcing a non-compliant value.
Health-check-backed rules map Pass to Pass, Fail and Warn to Fail, NotApplicable to
NotApplicable, and anything else to Unknown.
The score runs from 0 to 100. It is the weighted share of Pass among the rules that passed or failed. NotApplicable, Manual and Unknown rules are reported but left out of the score. A baseline with nothing to score scores 100.
| Severity | Framework | Weight |
|---|---|---|
CAT I |
DISA STIG, high | 10 |
CAT II |
DISA STIG, medium | 5 |
CAT III |
DISA STIG, low | 2 |
L1 |
CIS Level 1 | 5 |
L2 |
CIS Level 2 | 3 |
BL |
CIS BitLocker section | 5 |
NG |
CIS Next Generation Windows Security section | 3 |
Baseline |
Microsoft Security Baseline | 5 |
For example, if only two rules can be scored, a CAT I rule that passes (weight 10) and a CAT II rule that fails (weight 5), the score is 10 out of 15, rounded to 67.
Choose at most one format. --out <file> writes the report to a file; with --out and no format,
the report is JSON.
| Option | Report |
|---|---|
--json |
The full report wrapped with a SHA-256 integrity hash of its canonical JSON, so a collector can detect tampering. Add --sign <pem> to add an ES256 signature over the same bytes. |
--csv |
One row per rule. Cells that would start a spreadsheet formula are neutralised. |
--html |
A single self-contained file with the score, an outcome summary and one table per severity |
--sarif |
SARIF 2.1.0, with the baseline rule ids as SARIF rule ids, for code-scanning dashboards |
--sign works only with JSON. The key is an ES256 (P-256) private key in a PEM file; see
Profiles for one way to create one.
otw audit run --baseline disa-stig-v2r7 --json --sign .\audit-signing-key.pem --out .\stig.json| Exit | When |
|---|---|
0 |
No rule failed |
1 |
At least one rule failed |
2 |
Error, more than one format, or --sign with a non-JSON format |
3 |
Unsupported OS |
4 |
Unknown or invalid baseline, or an unreadable signing key |
Because a failing audit exits with 1, an audit fits a detection script the same way otw scan
does.
Register a SYSTEM task that audits on a schedule and drops the JSON report where you collect it:
otw task install --audit disa-stig-v2r7 --out "\\fileserver\otw-audits\$env:COMPUTERNAME.json" --weeklyThe task is \OpenTheWindows\Audit and runs
otw.exe audit run --baseline "<id>" --json --out "<path>". It accepts the built-in baseline ids.
See Enterprise Deployment.
A baseline is a JSON file. You can audit against a file directly, or validate a folder of them:
otw audit run --baseline .\our-baseline.json
otw audit validate --baseline-dir .\baselines| Field | Rules |
|---|---|
schemaVersion |
1 |
id |
Lower-case letters and digits, separated by . or -, up to 64 characters |
title |
Up to 120 characters |
rules |
At least one rule |
rules[].ruleId |
The framework's control id |
rules[].title |
Up to 200 characters |
rules[].severity |
CAT I, CAT II, CAT III, L1, L2, BL, NG or Baseline
|
rules[].tweakIds |
Catalogue entry ids that satisfy the rule (may be empty) |
rules[].checkOnly |
Optional: { "healthCheckId": "<id>" } to use a health check instead |
rules[].sources |
At least one https link |
A rule from the built-in STIG baseline that uses a health check:
{ "ruleId": "V-253257", "title": "Require UEFI Secure Boot to be enabled on the system.", "severity": "CAT II", "tweakIds": [], "checkOnly": { "healthCheckId": "boot.secure-boot" }, "sources": ["https://cyber.trackr.live/stig/Windows_11/2/7", "https://www.cyber.mil/stigs/downloads/"] }Validation checks every referenced entry id against the catalogue and every healthCheckId
against the health checks. A baseline in --baseline-dir overrides a built-in one with the same
id.
The health-check ids are: defender.realtime, defender.tamper-protection, boot.secure-boot,
boot.tpm, bitlocker.os-volume, vbs.device-guard, lsa.ppl, dma.kernel,
update.build-support, accounts.local-admins, identity.join-state, identity.windows-hello,
firewall.profiles, remote.rdp, smb.hardening, services.remote-management,
apps.sudo-dev-mode, apps.control-policy, drivers.blocklist, core-isolation.hvci,
edition.support, recovery.winre, network.exposure, eventlog.security-size,
defender.exclusions, policy.local-security, av.third-party and management.enrollment.
Run otw health to see what each one reports on this PC.
Open the Windows is free software under the MIT license · Source on GitHub