forked from mtusi2026/mtusi2026lab7
Prepare verified laboratory 7 implementation and evidence
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"state": "FAILED",
|
||||
"results": [
|
||||
{
|
||||
"check": "check",
|
||||
"exit": 1,
|
||||
"path": "/mnt/data/home/bench-saves/mtuci-vp7-security-20261115/evidence/openbao/source-e6cf9ebd-16f9-4f2a-85f7-2847abde1bf4/check.txt"
|
||||
},
|
||||
{
|
||||
"check": "test:unit",
|
||||
"exit": 0,
|
||||
"path": "/mnt/data/home/bench-saves/mtuci-vp7-security-20261115/evidence/openbao/source-e6cf9ebd-16f9-4f2a-85f7-2847abde1bf4/test-unit.txt"
|
||||
},
|
||||
{
|
||||
"check": "format:check",
|
||||
"exit": 0,
|
||||
"path": "/mnt/data/home/bench-saves/mtuci-vp7-security-20261115/evidence/openbao/source-e6cf9ebd-16f9-4f2a-85f7-2847abde1bf4/format-check.txt"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
student-tests/git-tracking-proof.test.ts(69,29): error TS2322: Type 'Promise<{ readonly "scripts/example.ts": string; } | { "scripts/example.ts"?: undefined; readonly "scripts/new.ts": string; }>' is not assignable to type 'Promise<SourceHashes>'.
|
||||
Type '{ readonly "scripts/example.ts": string; } | { "scripts/example.ts"?: undefined; readonly "scripts/new.ts": string; }' is not assignable to type 'SourceHashes'.
|
||||
Type '{ "scripts/example.ts"?: undefined; readonly "scripts/new.ts": string; }' is not assignable to type 'SourceHashes'.
|
||||
Property '"scripts/example.ts"' is incompatible with index signature.
|
||||
Type 'undefined' is not assignable to type 'string'.
|
||||
$ bun check --no-script --threads=2
|
||||
Found 1 error in 1 file, checked 114 files [808.59ms]
|
||||
error: script "check" exited with code 1
|
||||
@@ -0,0 +1,2 @@
|
||||
PASS_NATIVE_FORMAT_NONWRITING_CHECK
|
||||
$ bun scripts/format-check.ts
|
||||
@@ -0,0 +1,194 @@
|
||||
bun test v1.4.4 (38afee6c8)
|
||||
$ bun test student-tests/security-guards.test.ts student-tests/kv-secrets.test.ts student-tests/public-endpoint.test.ts student-tests/operator-crypto.test.ts student-tests/pki.test.ts student-tests/grpc-probe.test.ts student-tests/transport-negative.test.ts student-tests/command-runner.test.ts student-tests/checkpoint-guards.test.ts student-tests/openobserve-topology.test.ts student-tests/openobserve-config.test.ts student-tests/openobserve-accounts.test.ts student-tests/openobserve-request-path.test.ts student-tests/openobserve-response.test.ts student-tests/openobserve-search-window.test.ts student-tests/openobserve-reader.test.ts student-tests/openobserve-account-workflow.test.ts student-tests/grafana-guards.test.ts student-tests/grafana-datasources.test.ts student-tests/http-fixture.test.ts student-tests/browser-lifecycle.test.ts student-tests/runtime-preparation.test.ts student-tests/sealed-shutdown.test.ts student-tests/failover-proof.test.ts student-tests/git-tracking-proof.test.ts
|
||||
|
||||
student-tests/grafana-datasources.test.ts:
|
||||
(pass) native listDTO may omit auth fields; authenticate the exact UID detail and health readers [0.43ms]
|
||||
(pass) configured root account is rejected before datasource health can masquerade as scoped auth [0.11ms]
|
||||
(pass) HTTP200 health with error body is not a healthy datasource [0.06ms]
|
||||
|
||||
student-tests/failover-proof.test.ts:
|
||||
(pass) read current receipt contents and bind its stopped replica to the current attempt baseline [0.24ms]
|
||||
(pass) reject old operation receipt even when a file exists [0.13ms]
|
||||
(pass) reject foreign attempt receipt even when a file exists [0.01ms]
|
||||
(pass) reject wrong alias receipt even when a file exists
|
||||
(pass) reject wrong container receipt even when a file exists
|
||||
(pass) reject still running receipt even when a file exists
|
||||
(pass) reject not initially running receipt even when a file exists
|
||||
(pass) reject foreign service receipt even when a file exists [0.01ms]
|
||||
(pass) missing receipt preserves reader error instead of accepting older stable files [0.08ms]
|
||||
(pass) required read port has no live filesystem fallback [0.02ms]
|
||||
|
||||
student-tests/openobserve-response.test.ts:
|
||||
(pass) HTTP401 text error preserves native HTTP outcome [2.57ms]
|
||||
(pass) HTTP422 text error preserves native HTTP outcome
|
||||
(pass) HTTP500 text error preserves native HTTP outcome
|
||||
(pass) HTTP200 JSON remains parsed [0.03ms]
|
||||
(pass) HTTP200 malformed success retains the status in its error [0.03ms]
|
||||
|
||||
student-tests/http-fixture.test.ts:
|
||||
(pass) human fixture labels never become invalid API usernames [0.11ms]
|
||||
(pass) unexpected native HTTP result retains its exact outcome before stable failure [0.35ms]
|
||||
(pass) diagnostic write failure cannot replace HTTP400 [0.07ms]
|
||||
|
||||
student-tests/openobserve-account-workflow.test.ts:
|
||||
(pass) saved native200 and403 accounts publish only after both account controls [0.28ms]
|
||||
(pass) positive HTTP401 cannot publish derived credentials [0.06ms]
|
||||
(pass) positive HTTP503 cannot publish derived credentials [0.01ms]
|
||||
(pass) positive HTTP201 cannot publish derived credentials
|
||||
(pass) unexpected deny HTTP200 cannot publish derived credentials [0.06ms]
|
||||
(pass) unexpected deny HTTP503 cannot publish derived credentials
|
||||
(pass) invalid saved query shape user cannot publish or probe [0.06ms]
|
||||
(pass) invalid saved query shape user cannot publish or probe [0.01ms]
|
||||
(pass) invalid saved query shape token cannot publish or probe
|
||||
(pass) invalid saved query shape token cannot publish or probe
|
||||
(pass) extra owner slot never reaches credential publication [0.05ms]
|
||||
(pass) workflow requires explicit native and publishing ports [0.02ms]
|
||||
(pass) invalid query token after a healthy ingest control still cannot publish any derived file [0.07ms]
|
||||
|
||||
student-tests/openobserve-config.test.ts:
|
||||
(pass) Collector uses native file auth and distinct stream-name handling for logs/traces versus metrics [7.00ms]
|
||||
(pass) Grafana queries measured native metric names without legacy namespace or invented suffixes [1.22ms]
|
||||
(pass) Grafana native plugin provisioning uses measured fields and native Basic auth consumers [0.16ms]
|
||||
(pass) Grafana mounts native alert rules using the measured datasource and metric names [0.24ms]
|
||||
|
||||
student-tests/pki.test.ts:
|
||||
(pass) issued leaf verifies exact SAN, issuer, validity and matching key [478.57ms]
|
||||
|
||||
student-tests/openobserve-accounts.test.ts:
|
||||
(pass) native service-account success saves exact credential before returning without a human-user API [0.26ms]
|
||||
(pass) native HTTP401 never publishes an account [0.08ms]
|
||||
(pass) native HTTP403 never publishes an account [0.02ms]
|
||||
(pass) native HTTP500 never publishes an account
|
||||
(pass) invalid native result fails closed code 3 [0.08ms]
|
||||
(pass) invalid native result fails closed token 0
|
||||
(pass) invalid native result fails closed token 4097
|
||||
(pass) invalid native result fails closed user 23
|
||||
(pass) invalid native result fails closed token 4
|
||||
(pass) account persistence failure stays primary and prevents a success result [0.08ms]
|
||||
|
||||
student-tests/checkpoint-guards.test.ts:
|
||||
(pass) checkpoint second snapshot rejects changed bytes, additions and removals [0.12ms]
|
||||
(pass) historical evidence never replaces existing different bytes and permits exact identical bytes [0.18ms]
|
||||
(pass) handover lease rejects a different valid source generation after initial verification [0.43ms]
|
||||
(pass) handover lease rejects source mutation even when receipt is unchanged [0.13ms]
|
||||
(pass) historical finalization requires its accepted source and build generation binding [0.13ms]
|
||||
|
||||
student-tests/runtime-preparation.test.ts:
|
||||
(pass) canonical runtime invokes its build exactly once [0.11ms]
|
||||
(pass) checked cache verifies existing runtime without an implicit build [0.05ms]
|
||||
(pass) failed cache verification preserves its error and never falls back to a build [0.07ms]
|
||||
(pass) unknown runtime mode fails before either operational port [0.05ms]
|
||||
(pass) constructor requires both explicit ports [0.02ms]
|
||||
|
||||
student-tests/sealed-shutdown.test.ts:
|
||||
(pass) fresh running processes with post-seal cause and exit prove all three shutdowns [1.12ms]
|
||||
(pass) unrelated restart without freshness cause cannot pass sealed acceptance [0.22ms]
|
||||
(pass) old pre-seal events cannot explain a later unrelated restart [0.17ms]
|
||||
(pass) future cause events are not accepted [0.11ms]
|
||||
(pass) cause event alone does not prove process exit or restart [0.10ms]
|
||||
(pass) malformed baseline freshness fails before seal [0.09ms]
|
||||
(pass) future baseline freshness fails before seal [0.02ms]
|
||||
(pass) stale baseline freshness fails before seal [0.02ms]
|
||||
(pass) all baseline processes must be running before seal [0.07ms]
|
||||
(pass) freshness read I/O error preserves its primary identity and never seals [0.06ms]
|
||||
(pass) baseline ages are rechecked after reads immediately before sealing [0.06ms]
|
||||
(pass) a replaced container cannot satisfy the original process baseline [0.07ms]
|
||||
|
||||
student-tests/kv-secrets.test.ts:
|
||||
(pass) reads the native KVv2 envelope for api [0.16ms]
|
||||
(pass) reads the native KVv2 envelope for worker [0.02ms]
|
||||
(pass) rejects missing KVv2 nesting and required fields [0.06ms]
|
||||
(pass) rejects credentials for another role [0.03ms]
|
||||
(pass) rejects invalid metadata and denied responses [0.04ms]
|
||||
|
||||
student-tests/grafana-guards.test.ts:
|
||||
(pass) Grafana endpoint uses the verified published loopback binding despite two networks [0.07ms]
|
||||
(pass) Grafana endpoint rejects foreign, stopped, wildcard, missing and ambiguous bindings [0.11ms]
|
||||
(pass) real numeric zero is a valid metric sample [0.10ms]
|
||||
(pass) HTTP200 with datasource error, empty, null, nonfinite or ragged values cannot pass [0.07ms]
|
||||
(pass) native history first creation binds exact collection and user key [0.05ms]
|
||||
(pass) existing native history uses versioned PATCH at the same owned key [0.02ms]
|
||||
(pass) native Grafana evaluator key reordering does not change a rule [0.15ms]
|
||||
|
||||
student-tests/openobserve-request-path.test.ts:
|
||||
(pass) native URLSearchParams PromQL spaces stay valid before any credential or process port [0.08ms]
|
||||
(pass) rejects invalid request URI "https://foreign/api/default/streams" [0.02ms]
|
||||
(pass) rejects invalid request URI "/api/foreign/streams"
|
||||
(pass) rejects invalid request URI "/api/default/streams\r\nX: bad"
|
||||
(pass) rejects invalid request URI "/api/default/_search#fragment"
|
||||
(pass) rejects invalid request URI "/api/default/space in path"
|
||||
(pass) pinned plugin organization editor endpoint remains available [0.01ms]
|
||||
|
||||
student-tests/openobserve-search-window.test.ts:
|
||||
(pass) actual fractional filesystem mtime serializes native integer microseconds [0.05ms]
|
||||
(pass) invalid search window NaN 1 fails before a native call [0.02ms]
|
||||
(pass) invalid search window 1 Infinity fails before a native call
|
||||
(pass) invalid search window -1 100 fails before a native call
|
||||
(pass) invalid search window 1 1.7976931348623157e+308 fails before a native call
|
||||
(pass) invalid search window 10 1 fails before a native call
|
||||
(pass) invalid search window 1 1 fails before a native call
|
||||
(pass) invalid search window 1 3600002 fails before a native call
|
||||
|
||||
student-tests/openobserve-topology.test.ts:
|
||||
(pass) telemetry storage is a single OpenObserve instead of Prometheus Loki Tempo and their gateways [0.39ms]
|
||||
(pass) OpenObserve has its own persistent data and a closed private gateway namespace [0.07ms]
|
||||
(pass) storage migration retains required neighbors and existing app OTLP contract without OpenObserve secrets [0.10ms]
|
||||
(pass) Collector and Grafana storage transport targets OpenObserve through the verified gateway [0.14ms]
|
||||
(pass) Grafana query gateway permits actual editor metadata and guards native request fields [0.05ms]
|
||||
(pass) Grafana can use an own verified immutable cache alias without changing the canonical image pin [0.04ms]
|
||||
(pass) Grafana uses its own file-delivered encryption key and secure HTTPS cookies [0.06ms]
|
||||
(pass) Grafana cannot fetch extra plugin packages outside the approved cached artifacts [0.03ms]
|
||||
|
||||
student-tests/command-runner.test.ts:
|
||||
(pass) secondary diagnostic failures cannot replace command exit and both receipt writers are attempted [0.18ms]
|
||||
(pass) successful and explicitly allowed command outcomes are returned without diagnostic writes [0.10ms]
|
||||
(pass) runner requires explicit fake ports and preserves primary execution error [0.07ms]
|
||||
|
||||
student-tests/operator-crypto.test.ts:
|
||||
(pass) operator envelope authenticates ciphertext and hides plaintext [110.87ms]
|
||||
(pass) operator envelope requires a sufficiently long passphrase [0.04ms]
|
||||
|
||||
student-tests/public-endpoint.test.ts:
|
||||
(pass) selects the actual published loopback listener despite two LB networks [0.10ms]
|
||||
(pass) rejects invalid published ports [0.06ms]
|
||||
(pass) rejects unpublished, public, stopped and foreign-resource endpoints [0.06ms]
|
||||
|
||||
student-tests/transport-negative.test.ts:
|
||||
(pass) Bun native certificate-required alert counts as client denial while timeout never does [0.52ms]
|
||||
|
||||
student-tests/security-guards.test.ts:
|
||||
(pass) age rejects future, invalid and stale receipts [0.08ms]
|
||||
(pass) client role requires exact allowlist membership [0.06ms]
|
||||
(pass) network endpoints require TLS and an exact intended hostname [0.07ms]
|
||||
|
||||
student-tests/git-tracking-proof.test.ts:
|
||||
(pass) actual producer output is accepted only for matching pinned bytes and current source [0.67ms]
|
||||
(pass) changed proof bytes are rejected before source inspection [0.15ms]
|
||||
(pass) missing proof preserves the primary read failure [0.08ms]
|
||||
(pass) changed source bytes invalidates canonical Git evidence [0.18ms]
|
||||
(pass) added source entry invalidates canonical Git evidence [0.06ms]
|
||||
(pass) nonempty private tracking query result never becomes a zero-count proof [0.12ms]
|
||||
(pass) a weakened query cannot prove the original private-file patterns [0.10ms]
|
||||
(pass) producer rejects a changing HEAD during capture [0.08ms]
|
||||
(pass) producer rejects a changing source snapshot [0.09ms]
|
||||
|
||||
student-tests/browser-lifecycle.test.ts:
|
||||
(pass) newPage rejection closes the already acquired context exactly once [0.22ms]
|
||||
(pass) listener setup failure closes the already acquired context exactly once [0.06ms]
|
||||
(pass) normal browser work returns its result and closes exactly once [0.05ms]
|
||||
(pass) cleanup failure is separately reported without replacing the primary error [0.05ms]
|
||||
(pass) cleanup failure after successful work remains a failure [0.04ms]
|
||||
(pass) missing ports reject before any browser can be acquired [0.02ms]
|
||||
|
||||
student-tests/grpc-probe.test.ts:
|
||||
(pass) native HTTP2 gRPC probe requires a valid Export response and checks request framing [358.55ms]
|
||||
|
||||
student-tests/openobserve-reader.test.ts:
|
||||
(pass) reader produces fixed historical SQL end and the same PromQL time after three hours [2.58ms]
|
||||
(pass) fresh reader default uses the explicit clock for both native request forms [0.21ms]
|
||||
(pass) reader requires explicit native request and clock ports [0.03ms]
|
||||
|
||||
137 pass
|
||||
0 fail
|
||||
354 expect() calls
|
||||
Ran 137 tests across 25 files. [1.66s]
|
||||
Reference in New Issue
Block a user