@holoscript/holosystem 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +547 -0
- package/bin/holosystem.mjs +427 -7
- package/docs/native-build-threat-model.md +150 -0
- package/docs/vm-launch-threat-model.md +91 -0
- package/package.json +3 -2
- package/src/index.mjs +37 -0
- package/src/native-build.mjs +970 -0
- package/src/substrate-debian-release.mjs +852 -0
- package/src/substrate-import-debian.mjs +979 -0
- package/src/substrate-import.mjs +578 -0
- package/src/substrate.mjs +789 -0
- package/src/vm-launch.mjs +927 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Machine VM launch threat model
|
|
2
|
+
|
|
3
|
+
## Claim
|
|
4
|
+
|
|
5
|
+
`vm-launch` and `vm-launch-whpx` prove that two launches of the same measured
|
|
6
|
+
QEMU runtime, Linux kernel, and initramfs reached the same pinned serial success
|
|
7
|
+
signal through generated, closed full-system QEMU invocations. Optional virtual
|
|
8
|
+
devices are minimized: there is no default device set, network, USB, display, or
|
|
9
|
+
monitor. Each receipt binds the plan, complete runtime manifest, executable,
|
|
10
|
+
guest artifacts, and adapter-specific fixed launch policy.
|
|
11
|
+
|
|
12
|
+
The TCG adapter is a machine-VM execution receipt and sets `hardwareBacked` to
|
|
13
|
+
`false`. The separately named WHPX adapter selects only `accel=whpx`, has no TCG
|
|
14
|
+
fallback, and sets `hardwareBacked` to `true` only when two explicit WHPX boots
|
|
15
|
+
succeed with matching observations. This proves use of QEMU's hardware-backed
|
|
16
|
+
Windows Hypervisor Platform adapter for those launches; it does not prove host
|
|
17
|
+
process isolation. QEMU retains the ambient rights of its Windows process in
|
|
18
|
+
both adapters.
|
|
19
|
+
|
|
20
|
+
## Protected assets and trust boundaries
|
|
21
|
+
|
|
22
|
+
The protected inputs are the declarative plan, the complete caller-owned QEMU
|
|
23
|
+
runtime directory, the guest kernel, and the guest initramfs. Operational paths
|
|
24
|
+
are not part of the plan or receipt. The receipt exposes digests, byte counts,
|
|
25
|
+
bounded launch summaries, coverage, and named residual boundaries.
|
|
26
|
+
|
|
27
|
+
The tracer does not prove:
|
|
28
|
+
|
|
29
|
+
- QEMU, the guest kernel, initramfs, or firmware were built from trusted source;
|
|
30
|
+
- Windows, the CPU, QEMU, or Node.js implemented the measurement correctly;
|
|
31
|
+
- TCG hardware virtualization, or WHPX IOMMU separation, measured boot, Secure
|
|
32
|
+
Boot, TPM, confidential memory, or side-channel resistance;
|
|
33
|
+
- host crash dumps, swap, hibernation, debugger state, or physical custody are
|
|
34
|
+
protected;
|
|
35
|
+
- the guest success program establishes a broader workload security property.
|
|
36
|
+
|
|
37
|
+
Those limitations are machine-readable in `boundaries` and `coverage` rather
|
|
38
|
+
than implied away by a successful boot.
|
|
39
|
+
|
|
40
|
+
## Adversary specifications
|
|
41
|
+
|
|
42
|
+
| Adversary action | Required result | Receipt or test evidence |
|
|
43
|
+
| ---------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------- |
|
|
44
|
+
| Add a shell command, argument vector, environment field, device, network mode, or unknown plan field | Reject before process launch | `vm-launch-field-unknown`; closed-vocabulary test |
|
|
45
|
+
| Put WHPX in a TCG plan, TCG in a WHPX plan, or request a fallback | Reject rather than downgrade, cross-route, or overclaim | Separate schemas; accelerator/unknown-field tests |
|
|
46
|
+
| Replace any QEMU executable, DLL, firmware file, kernel, or initramfs before measurement | Reject before process launch | Runtime, binary, kernel, and initrd digest mismatch issues |
|
|
47
|
+
| Replace measured files while the launch snapshot is being created | Reject the snapshot | Runtime, kernel, and initrd snapshot mismatch issues |
|
|
48
|
+
| Replace caller-owned files after the first launch | Second launch still uses the same private snapshot | Private-snapshot substitution test |
|
|
49
|
+
| Persistently self-modify the private runtime or guest artifacts during a launch | Reject on post-launch remeasurement | Private-snapshot drift test |
|
|
50
|
+
| Inject QEMU behavior through inherited environment variables or user configuration | Launch with a minimal environment and `-no-user-config` | Generated-argv test |
|
|
51
|
+
| Obtain implicit host devices or a communication channel | Start with `-nodefaults`, `-nic none`, USB off, no display, and no monitor | Generated-argv test |
|
|
52
|
+
| Forge the guest signal, use the wrong exit path, or change adapter diagnostics | Reject the receipt and retain no raw output | Console, exit-code, and diagnostic-digest tests |
|
|
53
|
+
| Make clean launches observably disagree | Reject deterministic coverage | `vm-launch-nondeterministic` |
|
|
54
|
+
| Inject a fake process runner through the public API | Ignore it and execute only the bound process implementation | Public process-runner injection test |
|
|
55
|
+
| Put an operational path or guest output in the receipt | Withhold it; report only digest and byte count | Receipt disclosure assertions |
|
|
56
|
+
|
|
57
|
+
## Fixed launch policy
|
|
58
|
+
|
|
59
|
+
The plan does not express QEMU arguments. Each implementation generates a q35
|
|
60
|
+
invocation for exactly one bound accelerator (`tcg` or `whpx`) with one CPU,
|
|
61
|
+
128 MiB, no user configuration, no default devices, no network, no USB, no
|
|
62
|
+
display, no monitor, no reboot, direct kernel boot, serial stdio, and a fixed
|
|
63
|
+
ISA debug-exit device. The TCG adapter pins QEMU's `max` CPU model; the WHPX
|
|
64
|
+
adapter leaves CPU selection to that hardware backend because the TCG model is
|
|
65
|
+
not a valid substitute. The guest command line is fixed and disables trust in
|
|
66
|
+
CPU random seeding. The process has a bounded timeout and output buffer and
|
|
67
|
+
receives only a small host/runtime environment.
|
|
68
|
+
|
|
69
|
+
Exactly two launches are required. The snapshot is remeasured immediately before
|
|
70
|
+
and after each launch. Each launch must exit with the fixed debug-exit status and
|
|
71
|
+
produce the plan-pinned serial digest. TCG must emit zero stderr bytes. WHPX must
|
|
72
|
+
produce the plan-pinned diagnostic digest after removal of only the exact,
|
|
73
|
+
randomized private-executor prefix that QEMU repeats at diagnostic line starts. Raw
|
|
74
|
+
stdout and stderr are never included in the receipt.
|
|
75
|
+
|
|
76
|
+
## Residual risk and next layer
|
|
77
|
+
|
|
78
|
+
The QEMU runtime closure includes firmware data files and DLLs, so substitution
|
|
79
|
+
changes its digest. Hashing does not establish provenance or measured boot.
|
|
80
|
+
Windows QEMU also cannot disable host crash-dump capture through this contract;
|
|
81
|
+
`host-crash-dump-custody` remains an explicit boundary.
|
|
82
|
+
|
|
83
|
+
QEMU is not yet placed in an AppContainer, restricted token, job-object filesystem
|
|
84
|
+
sandbox, or separate host VM. `virtual-device-minimization` therefore describes
|
|
85
|
+
only the generated guest-facing virtual device surface; it must not be read as
|
|
86
|
+
host-process or physical-device isolation.
|
|
87
|
+
|
|
88
|
+
The next stronger layer must add a separately measured Windows host-process
|
|
89
|
+
sandbox and firmware/measured-boot evidence. It must not reinterpret WHPX
|
|
90
|
+
execution as proof of either property, and it must continue to report IOMMU,
|
|
91
|
+
device-assignment, crash-dump custody, and side-channel boundaries separately.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holoscript/holosystem",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Portable bootstrap, consumption catalog, lineage, and bounded-work contract for HoloSystem consumers.",
|
|
5
5
|
"releaseLane": "v0-preview",
|
|
6
6
|
"keywords": [
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"files": [
|
|
35
35
|
"bin",
|
|
36
|
+
"docs",
|
|
36
37
|
"src",
|
|
37
38
|
"README.md",
|
|
38
39
|
"LICENSE"
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
"node": ">=18"
|
|
42
43
|
},
|
|
43
44
|
"scripts": {
|
|
44
|
-
"build": "node --check src/index.mjs && node --check src/catalog.mjs && node --check bin/holosystem.mjs",
|
|
45
|
+
"build": "node --check src/index.mjs && node --check src/catalog.mjs && node --check src/substrate.mjs && node --check src/substrate-import.mjs && node --check src/substrate-debian-release.mjs && node --check src/substrate-import-debian.mjs && node --check src/native-build.mjs && node --check src/vm-launch.mjs && node --check bin/holosystem.mjs",
|
|
45
46
|
"test": "node --test test/*.test.mjs",
|
|
46
47
|
"smoke": "node bin/holosystem.mjs --help",
|
|
47
48
|
"check": "pnpm run build && pnpm run test && pnpm run smoke",
|
package/src/index.mjs
CHANGED
|
@@ -1,6 +1,43 @@
|
|
|
1
1
|
export const HOLOSYSTEM_CONFIG_SCHEMA = 'holoscript.holosystem.consumer.v1';
|
|
2
2
|
export const HOLOSYSTEM_INSPECTION_SCHEMA = 'holoscript.holosystem.inspection.v1';
|
|
3
3
|
|
|
4
|
+
export {
|
|
5
|
+
HOLOSYSTEM_REBUILD_ATTESTATION_SCHEMA,
|
|
6
|
+
HOLOSYSTEM_SUBSTRATE_SCHEMA,
|
|
7
|
+
buildSubstrateClosure,
|
|
8
|
+
createRebuildAttestationPayload,
|
|
9
|
+
} from './substrate.mjs';
|
|
10
|
+
|
|
11
|
+
export { HOLOSYSTEM_SUBSTRATE_IMPORT_SCHEMA, importNpmPackageLock } from './substrate-import.mjs';
|
|
12
|
+
export { importDebianPackageSnapshot } from './substrate-import-debian.mjs';
|
|
13
|
+
export {
|
|
14
|
+
HOLOSYSTEM_DEBIAN_RELEASE_AUTH_SCHEMA,
|
|
15
|
+
verifyDebianRepositoryRelease,
|
|
16
|
+
} from './substrate-debian-release.mjs';
|
|
17
|
+
export {
|
|
18
|
+
HOLOSYSTEM_NATIVE_BUILD_PLAN_SCHEMA,
|
|
19
|
+
HOLOSYSTEM_NATIVE_BUILD_RECEIPT_SCHEMA,
|
|
20
|
+
HOLOSYSTEM_NATIVE_BUILD_SOURCE_SCHEMA,
|
|
21
|
+
createNativeRebuildAttestationPayload,
|
|
22
|
+
inspectNativeBuildPlan,
|
|
23
|
+
inspectNativeBuildSource,
|
|
24
|
+
runNativeBuild,
|
|
25
|
+
} from './native-build.mjs';
|
|
26
|
+
export {
|
|
27
|
+
HOLOSYSTEM_VM_ASSET_SCHEMA,
|
|
28
|
+
HOLOSYSTEM_VM_EXECUTOR_SCHEMA,
|
|
29
|
+
HOLOSYSTEM_VM_LAUNCH_PLAN_SCHEMA,
|
|
30
|
+
HOLOSYSTEM_VM_LAUNCH_RECEIPT_SCHEMA,
|
|
31
|
+
HOLOSYSTEM_WHPX_VM_LAUNCH_PLAN_SCHEMA,
|
|
32
|
+
HOLOSYSTEM_WHPX_VM_LAUNCH_RECEIPT_SCHEMA,
|
|
33
|
+
inspectVmExecutor,
|
|
34
|
+
inspectVmLaunchAsset,
|
|
35
|
+
inspectVmLaunchPlan,
|
|
36
|
+
inspectWhpxVmLaunchPlan,
|
|
37
|
+
runVmLaunch,
|
|
38
|
+
runWhpxVmLaunch,
|
|
39
|
+
} from './vm-launch.mjs';
|
|
40
|
+
|
|
4
41
|
export {
|
|
5
42
|
HOLOSYSTEM_CATALOG_SCHEMA,
|
|
6
43
|
HOLOSYSTEM_CONSUMER_INPUT_SCHEMA,
|