Skip to content

Commit f2c5c63

Browse files
committed
fix(mxc): repair audit configuration and qualification runner
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
1 parent 1587778 commit f2c5c63

11 files changed

Lines changed: 380 additions & 58 deletions

File tree

‎.agents/skills/build-openshell-mxc-windows/SKILL.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,3 +544,11 @@ The MSVC wrapper selects native test architecture from the machine environment,
544544
so an emulated SSH PowerShell does not incorrectly reject ARM64 qualification.
545545
Keep Windows kernel calls in the boundary library and retain shared supervisor
546546
unsafe-code bans, per-generation proxy authentication, and executable digests.
547+
548+
Use `windows:test:mxc-audit` to validate the shipped audit gateway config with
549+
its real parser, test JSONL coverage classification, and run the live seven-event
550+
ETW qualification. Build native release binaries first and set
551+
`OPENSHELL_WXC_EXEC_PATH`. The runner requires elevation or Performance Log Users
552+
membership and leaves a results bundle under the target directory. Ordinary MXC
553+
E2E success does not establish ETW audit coverage. Coverage must use structured
554+
JSONL and fail when an expected event is absent or has the wrong OCSF class.

‎crates/openshell-driver-mxc/README.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,3 +321,17 @@ workaround has been established.
321321
Provider environment publications reject case-insensitive duplicate names,
322322
invalid environment entries, and names reserved for the six injected TLS trust
323323
variables before installing them. Rejected updates retain the prior revision.
324+
325+
For live ETW audit coverage, set `OPENSHELL_WXC_EXEC_PATH` and run
326+
`mise run --skip-tools windows:test:mxc-audit` after building native release
327+
binaries. This requires elevation or Performance Log Users membership. It checks
328+
the shipped config and coverage classifier before requiring all seven event types
329+
in the durable JSONL output; the ordinary E2E scenarios do not check this path.
330+
331+
On the ARM64 test host (Windows build 28120, MXC 1.0.0), Sandboxing ETW records
332+
come from the shared Appinfo broker rather than the driver-owned executor.
333+
The consumer cannot correlate these records using the executor's PID and process
334+
generation, so live audit qualification currently fails even though the workload
335+
completes. The executor diagnostic log redacts its container identity. A trusted
336+
broker-to-launch correlation is needed; treating the shared broker PID as a
337+
sandbox identity would misattribute concurrent sandboxes and is not supported.

‎crates/openshell-driver-mxc/examples/README-ocsf-audit.txt‎

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ WHAT THIS PROVES / PRODUCES
1212

1313
The deliverable is the OCSF log: openshell-ocsf.<date>.log, one OCSF event
1414
object per line - the same schema and medium the Linux OpenShell pipeline
15-
produces (Windows is at functional parity).
15+
produces.
1616

1717
OCSF classes you will see:
1818
[6002] Application Lifecycle - sandbox created
@@ -22,7 +22,8 @@ WHAT THIS PROVES / PRODUCES
2222

2323
PREREQUISITES (on this test box)
2424
- wxc-exec.exe present (default expected: C:\mxc-kit\bin\wxc-exec.exe)
25-
- process_container backend live (it was for our earlier runs)
25+
- process_container backend live
26+
- OpenSSL on PATH to generate disposable supervisor signing keys
2627
- Run ELEVATED (Run as administrator) OR from an account in the
2728
'Performance Log Users' group. Opening the real-time ETW session needs this;
2829
without it the run fails fast with a clear message.
@@ -46,6 +47,9 @@ WHAT YOU GET BACK
4647
FILES IN THIS PACKAGE
4748
openshell-gateway.exe the gateway (self-contained; needs only VC++ runtime)
4849
openshell.exe the CLI
50+
openshell-supervisor.exe host supervisor
51+
openshell-windows-sandbox.exe sandbox runtime
52+
libz3.dll matching native Z3 runtime
4953
mxc-ocsf-audit.toml gateway/driver config (process_container, etw_audit=true, egress proxy)
5054
ocsf-audit.yaml sandbox policy (read-write grant to the share dir)
5155
run-ocsf-audit.ps1 the orchestrator you run
@@ -54,9 +58,6 @@ FILES IN THIS PACKAGE
5458

5559
USEFUL OPTIONS
5660
-SandboxCount <n> Create n sandboxes (default 2). More sandboxes = more events.
57-
-NoProxy Skip the per-sandbox egress proxy. This omits ONLY the
58-
SandboxProxyConfigured config event; everything else is
59-
still produced. (Default is proxy ON for the full set.)
6061
-ShareDir <path> Host folder granted read-write to the workload. The script
6162
derives a disposable policy and per-sandbox config for it.
6263
-WxcExecPath <path> Path to wxc-exec.exe on this box.
@@ -65,10 +66,10 @@ USEFUL OPTIONS
6566
-KeepRunning Leave the gateway running afterward for inspection.
6667

6768
NOTES
69+
- Disposable supervisor signing keys are protected outside the results bundle
70+
and removed after the gateway stops (retained with -KeepRunning).
6871
- The control plane between CLI and gateway runs with --disable-tls on loopback;
6972
that is unrelated to the OCSF audit path this example exercises.
70-
- A "supervisor session not connected" / ssh 255 message during sandbox create
71-
is EXPECTED on MXC and harmless - the agent already ran in-driver.
7273
- The proxy path requires the host-side CONNECT proxy and an absolute agent
7374
binary (the packaged config uses C:\Windows\System32\cmd.exe); the run script
7475
handles this for you.
@@ -78,3 +79,15 @@ NOTES
7879
- MXC process audit events record the executable basename only. Command-line
7980
arguments are omitted from OCSF JSON and shorthand because they can contain
8081
credentials, signed URLs, or PII.
82+
83+
COVERAGE
84+
All seven required ETW event types must be present in structured JSONL.
85+
Console shorthand formatting does not affect coverage. The supervisor proxy
86+
is always provisioned; an OS proxy-configuration event is not required.
87+
88+
CURRENT QUALIFICATION LIMITATION
89+
On the ARM64 Windows build 28120 / MXC 1.0.0 test host, the Sandboxing provider
90+
emits from the shared Appinfo broker. The consumer's executor PID/generation
91+
anchor cannot correlate those records, so this qualification remains FAIL.
92+
Captured records are not sufficient: all seven attributed JSONL event types
93+
are still required. Do not use the shared broker PID as a sandbox identity.

‎crates/openshell-driver-mxc/examples/mxc-ocsf-audit.toml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@
1313
# disposable copy of this file. Workload command and
1414
# cwd are sandbox-scoped and passed separately through --driver-config-json.
1515

16+
[openshell]
17+
version = 2
18+
1619
[openshell.drivers.mxc]
20+
# This disposable example supplies its workload through --driver-config-json.
21+
allow_driver_config = true
1722
# Path to wxc-exec.exe on the box (patched by the run script; default is the
1823
# location observed on the MXC test boxes).
1924
wxc_exec_path = "C:\\mxc-kit\\bin\\wxc-exec.exe"

0 commit comments

Comments
 (0)