Fix SYSTEM script directory sharing and record original failed VM attempt
Rust development slice / linux (push) Failing after 7s
Rust development slice / linux (push) Failing after 7s
This commit is contained in:
@@ -58,4 +58,8 @@ windows-sys = { version = "0.61.2", features = ["Win32_Foundation", "Win32_Secur
|
||||
name = "windows_reviewed_recovery"
|
||||
required-features = ["system-helper"]
|
||||
|
||||
[[example]]
|
||||
name = "windows_system_result_witness"
|
||||
required-features = ["system-helper"]
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -0,0 +1,255 @@
|
||||
//! Read-only, fixed MVP acceptance witness. No execution or journal mutation.
|
||||
#[cfg(windows)]
|
||||
fn run() -> anyhow::Result<()> {
|
||||
use anyhow::{Result, ensure};
|
||||
use rmm_agent_core::{
|
||||
auth::{Binding, Outcome, Request},
|
||||
crypto::DalekVerifier,
|
||||
};
|
||||
use rmm_domain::jobs::{Action, hash};
|
||||
use rusqlite::{Connection, OpenFlags, OptionalExtension, params};
|
||||
use serde_json::{Value, json};
|
||||
use std::{path::Path, time::Duration};
|
||||
use windows_sys::Win32::{
|
||||
Foundation::CloseHandle,
|
||||
Security::{GetTokenInformation, TOKEN_ELEVATION, TOKEN_QUERY, TokenElevation},
|
||||
System::Threading::{GetCurrentProcess, OpenProcessToken},
|
||||
};
|
||||
ensure!(std::env::args().count() == 1, "FIXED_READ_ONLY_ARGUMENTS");
|
||||
let mut token = std::ptr::null_mut();
|
||||
ensure!(
|
||||
unsafe { OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &mut token) } != 0,
|
||||
"ADMIN_TOKEN"
|
||||
);
|
||||
let mut elevation = TOKEN_ELEVATION { TokenIsElevated: 0 };
|
||||
let mut size = 0;
|
||||
let okay = unsafe {
|
||||
GetTokenInformation(
|
||||
token,
|
||||
TokenElevation,
|
||||
&mut elevation as *mut _ as *mut _,
|
||||
std::mem::size_of::<TOKEN_ELEVATION>() as u32,
|
||||
&mut size,
|
||||
)
|
||||
};
|
||||
unsafe { CloseHandle(token) };
|
||||
ensure!(
|
||||
okay != 0 && elevation.TokenIsElevated != 0,
|
||||
"ADMIN_REQUIRED"
|
||||
);
|
||||
fn open(path: &str) -> Result<Connection> {
|
||||
ensure!(Path::new(path).is_file(), "ORIGINAL_JOURNAL_REQUIRED");
|
||||
let db = Connection::open_with_flags(
|
||||
path,
|
||||
OpenFlags::SQLITE_OPEN_READ_ONLY | OpenFlags::SQLITE_OPEN_NO_MUTEX,
|
||||
)?;
|
||||
db.busy_timeout(Duration::from_millis(500))?;
|
||||
Ok(db)
|
||||
}
|
||||
|
||||
let job_id = "94047873-5088-433b-bc1b-490d3eafe0da";
|
||||
let attempt_id = "f071e6d6-8635-42f7-92fa-533c681edd8b";
|
||||
let grant_id = "97e705b8-fb2b-4158-84d9-d90595d1ce6e";
|
||||
let plan_hash = "9afc2bacefd937199bf6407c12b1f7c5cad933cd875514f651afcca9eb9fae43";
|
||||
let script_hash = "880930d2b5d903a8ee8f4a9d3acad6162ef994b1822d7381c8468230bcf4a86c";
|
||||
let raw = std::fs::read(r"C:\ProgramData\RustDiscovery\binding.json")?;
|
||||
ensure!(raw.len() <= 8192, "PUBLIC_BINDING_BOUND");
|
||||
let binding: Binding = serde_json::from_slice(&raw)?;
|
||||
ensure!(
|
||||
binding.tenant_id.to_string() == "11111111-1111-4111-8111-111111111111"
|
||||
&& binding.asset_id.to_string() == "a176520e-8a91-4e93-a78b-8e7620f430e0"
|
||||
&& binding.agent_id.to_string() == "63ea15b2-0643-403d-b5b4-cba1288dbea3"
|
||||
&& binding.enrollment_generation == 1
|
||||
&& binding.assignment_version == 1,
|
||||
"ORIGINAL_DEVICE_BINDING"
|
||||
);
|
||||
fn evidence(
|
||||
db: &Connection,
|
||||
binding: &Binding,
|
||||
job_id: &str,
|
||||
attempt_id: &str,
|
||||
grant_id: &str,
|
||||
plan_hash: &str,
|
||||
script_hash: &str,
|
||||
) -> Result<Value> {
|
||||
let count: u64 = db.query_row(
|
||||
"SELECT count(*) FROM consumed WHERE job=?1 OR attempt=?2 OR grant_id=?3",
|
||||
params![job_id, attempt_id, grant_id],
|
||||
|r| r.get(0),
|
||||
)?;
|
||||
ensure!(count <= 1, "NO_DUPLICATE_CONSUMPTION");
|
||||
type Row = (Option<Vec<u8>>, Option<Vec<u8>>, Option<Vec<u8>>);
|
||||
let row:Option<Row>=db.query_row("SELECT e.start,e.outcome,c.result FROM consumed c LEFT JOIN execution_evidence e USING(grant_id) WHERE c.grant_id=?1 AND c.job=?2 AND c.attempt=?3 AND c.agent='63ea15b2-0643-403d-b5b4-cba1288dbea3' AND c.generation=1",params![grant_id,job_id,attempt_id],|r|Ok((r.get(0)?,r.get(1)?,r.get(2)?))).optional()?;
|
||||
let Some((start, outcome, finished)) = row else {
|
||||
ensure!(count == 0, "CONSUMPTION_BINDING_MISMATCH");
|
||||
return Ok(json!({"consumption_count":0,"start_count":0,"outcome_count":0}));
|
||||
};
|
||||
let mut report = json!({"consumption_count":count,"start_count":u8::from(start.is_some()),"outcome_count":u8::from(outcome.is_some()),"finished_present":finished.is_some(),"outcome_equals_finished":outcome==finished});
|
||||
if let Some(start) = start {
|
||||
ensure!(start.len() <= 131072, "START_BOUND");
|
||||
let saved: Value = serde_json::from_slice(&start)?;
|
||||
let request: Request = serde_json::from_value(saved["request"].clone())?;
|
||||
let reserved = serde_json::from_value(saved["reserved_at"].clone())?;
|
||||
let (job, permit) = binding.verify_with(&request, reserved, &DalekVerifier)?;
|
||||
ensure!(
|
||||
job.job_id.to_string() == job_id
|
||||
&& job.attempt_id.to_string() == attempt_id
|
||||
&& permit.grant_id.to_string() == grant_id
|
||||
&& request.plan_hash == plan_hash
|
||||
&& job.execution_identity == "system"
|
||||
&& job.max_runtime_seconds == 30
|
||||
&& job.max_output_bytes == 4096
|
||||
&& job.action.full_maintenance(),
|
||||
"SIGNED_ORIGINAL_SYSTEM_REQUEST"
|
||||
);
|
||||
let Action::RunScript { script_utf8, .. } = &job.action else {
|
||||
anyhow::bail!("SYSTEM_SCRIPT_REQUIRED")
|
||||
};
|
||||
ensure!(
|
||||
hash(script_utf8.as_bytes()) == script_hash,
|
||||
"EXACT_APPROVED_SCRIPT"
|
||||
);
|
||||
report["original_signature_verified"] = json!(true);
|
||||
report["request_sha256"] = json!(hash(&serde_json::to_vec(&request)?));
|
||||
report["start_sha256"] = json!(hash(&start));
|
||||
report["reserved_at"] = saved["reserved_at"].clone();
|
||||
report["original_boot_id"] = saved["previous_boot_id"].clone();
|
||||
}
|
||||
if let Some(outcome) = outcome {
|
||||
ensure!(outcome.len() <= 131072, "OUTCOME_BOUND");
|
||||
let result: Outcome = serde_json::from_slice(&outcome)?;
|
||||
report["outcome_sha256"] = json!(hash(&outcome));
|
||||
report["state"] = json!(result.state);
|
||||
report["error_code"] = json!(result.error_code);
|
||||
report["exit_code"] = json!(result.exit_code);
|
||||
report["stdout_bytes"] = json!(result.stdout.len());
|
||||
report["stderr_bytes"] = json!(result.stderr.len());
|
||||
report["stdout_sha256"] = json!(hash(&result.stdout));
|
||||
report["expected_stdout_matches"] =
|
||||
json!(result.stdout == b"Windows-System-MVP:S-1-5-18\r\n");
|
||||
report["output_truncated"] = json!(result.output_truncated);
|
||||
report["evidence"] = result.evidence;
|
||||
}
|
||||
Ok(report)
|
||||
}
|
||||
let agent = open(r"C:\ProgramData\RustDiscovery\state\telemetry.sqlite")?;
|
||||
let consumption = open(r"C:\ProgramData\RustDiscovery\state\consumption.sqlite")?;
|
||||
let helper = open(r"C:\ProgramData\RustDiscoverySystem\state\ledger.sqlite")?;
|
||||
let intents = open(r"C:\ProgramData\RustDiscoverySystem\agent-intents\system-intents.sqlite")?;
|
||||
let agent_result = evidence(
|
||||
&consumption,
|
||||
&binding,
|
||||
job_id,
|
||||
attempt_id,
|
||||
grant_id,
|
||||
plan_hash,
|
||||
script_hash,
|
||||
)?;
|
||||
let helper_result = evidence(
|
||||
&helper,
|
||||
&binding,
|
||||
job_id,
|
||||
attempt_id,
|
||||
grant_id,
|
||||
plan_hash,
|
||||
script_hash,
|
||||
)?;
|
||||
let state: Option<(String, Option<String>)> = agent
|
||||
.query_row(
|
||||
"SELECT state,grant_id FROM job_attempts WHERE job=?1 AND attempt=?2",
|
||||
params![job_id, attempt_id],
|
||||
|r| Ok((r.get(0)?, r.get(1)?)),
|
||||
)
|
||||
.optional()?;
|
||||
let initialized: bool = intents.query_row(
|
||||
"SELECT EXISTS(SELECT 1 FROM sqlite_master WHERE type='table' AND name='system_intents')",
|
||||
[],
|
||||
|r| r.get(0),
|
||||
)?;
|
||||
let mut intent_result = json!({"initialized":initialized,"count":0});
|
||||
if initialized {
|
||||
let count: u64 = intents.query_row(
|
||||
"SELECT count(*) FROM system_intents WHERE job=?1 OR attempt=?2 OR grant_id=?3",
|
||||
params![job_id, attempt_id, grant_id],
|
||||
|r| r.get(0),
|
||||
)?;
|
||||
ensure!(count <= 1, "NO_DUPLICATE_INTENT");
|
||||
type IntentRow = (Vec<u8>, String, String, u32, Option<String>);
|
||||
let row:Option<IntentRow>=intents.query_row("SELECT i.body,i.digest,i.phase,i.cancel_requested,m.outcome_sha256 FROM system_intents i LEFT JOIN system_intent_mirrors m USING(id) WHERE i.job=?1 AND i.attempt=?2 AND i.grant_id=?3",params![job_id,attempt_id,grant_id],|r|Ok((r.get(0)?,r.get(1)?,r.get(2)?,r.get(3)?,r.get(4)?))).optional()?;
|
||||
if let Some((body, digest, phase, cancelled, mirror)) = row {
|
||||
ensure!(
|
||||
body.len() <= 196608 && hash(&body) == digest,
|
||||
"INTENT_BODY_HASH"
|
||||
);
|
||||
let v: Value = serde_json::from_slice(&body)?;
|
||||
let request: Request = serde_json::from_value(v["request"].clone())?;
|
||||
let p: rmm_domain::jobs::ExecutionPermitPayload =
|
||||
serde_json::from_slice(&request.permit_bytes)?;
|
||||
let (job, permit) = binding.verify_with(&request, p.not_before, &DalekVerifier)?;
|
||||
ensure!(
|
||||
job.job_id.to_string() == job_id
|
||||
&& job.attempt_id.to_string() == attempt_id
|
||||
&& permit.grant_id.to_string() == grant_id
|
||||
&& request.plan_hash == plan_hash
|
||||
&& job.execution_identity == "system"
|
||||
&& v["policy_sha256"]
|
||||
== "cfd126d383ec0a948a73270a8362bd835d79341a079be05ce50088f0dbc5791c"
|
||||
&& v["helper_binary_sha256"]
|
||||
== "0502d6c87bd74c99f1665f3cc4b9d74b8e31d0f829d2ce1a1597d72e9be1e726",
|
||||
"ORIGINAL_INTENT_REQUEST_POLICY_CODE"
|
||||
);
|
||||
intent_result = json!({"initialized":true,"count":count,"phase":phase,"cancel_requested":cancelled,"body_sha256":digest,"original_signature_verified":true,"request_sha256":hash(&serde_json::to_vec(&request)?),"recorded_at":v["recorded_at"],"connection_generation":v["connection_generation"],"original_boot_id":v["original_boot_id"],"mirror_outcome_sha256":mirror});
|
||||
} else {
|
||||
ensure!(count == 0, "INTENT_BINDING_MISMATCH");
|
||||
}
|
||||
}
|
||||
use rmm_agent_windows::helper_ipc::{FileIdentity, file_identity};
|
||||
let actual_ledger = file_identity(&std::fs::File::open(
|
||||
r"C:\ProgramData\RustDiscoverySystem\state\ledger.sqlite",
|
||||
)?)?;
|
||||
let actual_lock = file_identity(&std::fs::File::open(
|
||||
r"C:\ProgramData\RustDiscoverySystem\state\executor.lock",
|
||||
)?)?;
|
||||
let actual_intents = file_identity(&std::fs::File::open(
|
||||
r"C:\ProgramData\RustDiscoverySystem\agent-intents\system-intents.sqlite",
|
||||
)?)?;
|
||||
let (a, b, c): (Vec<u8>, Vec<u8>, String) = helper.query_row(
|
||||
"SELECT ledger,executor_lock,binding_sha256 FROM windows_helper_files WHERE id=1",
|
||||
[],
|
||||
|r| Ok((r.get(0)?, r.get(1)?, r.get(2)?)),
|
||||
)?;
|
||||
ensure!(
|
||||
serde_json::from_slice::<FileIdentity>(&a)? == actual_ledger
|
||||
&& serde_json::from_slice::<FileIdentity>(&b)? == actual_lock
|
||||
&& c == hash(&serde_json::to_vec(&binding)?),
|
||||
"ORIGINAL_HELPER_FILE_IDENTITIES"
|
||||
);
|
||||
if initialized {
|
||||
let stored: Vec<u8> = intents.query_row(
|
||||
"SELECT file_identity FROM system_intent_meta WHERE id=1",
|
||||
[],
|
||||
|r| r.get(0),
|
||||
)?;
|
||||
ensure!(
|
||||
serde_json::from_slice::<FileIdentity>(&stored)? == actual_intents,
|
||||
"ORIGINAL_INTENT_FILE_ID"
|
||||
);
|
||||
}
|
||||
println!(
|
||||
"{}",
|
||||
json!({"schema_version":1,"read_only":true,"job_id":job_id,"attempt_id":attempt_id,"grant_id":grant_id,"plan_hash":plan_hash,"script_sha256":script_hash,"local_job":state,"agent":agent_result,"helper":helper_result,"intent":intent_result,"original_helper_file_ids_verified":true,"helper_ledger_file_id":actual_ledger,"intent_file_id":actual_intents,"tenant_id":binding.tenant_id,"asset_id":binding.asset_id,"agent_id":binding.agent_id,"enrollment_generation":binding.enrollment_generation,"assignment_version":binding.assignment_version,"public_binding_sha256":hash(&raw),"private_key_read":false,"execution_requested":false})
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
#[cfg(windows)]
|
||||
fn main() {
|
||||
if run().is_err() {
|
||||
eprintln!("SYSTEM_SCRIPT_WITNESS_REFUSED");
|
||||
std::process::exit(1)
|
||||
}
|
||||
}
|
||||
#[cfg(not(windows))]
|
||||
fn main() {
|
||||
eprintln!("Windows only");
|
||||
std::process::exit(1)
|
||||
}
|
||||
@@ -40,7 +40,7 @@ pub(crate) fn execute(
|
||||
};
|
||||
let directory = Path::new(crate::helper_system::STATE_ROOT);
|
||||
let writers = [helper_sid.to_owned()];
|
||||
let mut root = PinnedFile::open(directory, true, &[], &writers, false)?;
|
||||
let mut root = PinnedFile::open_read_shared(directory, true, &[], &writers)?;
|
||||
let path = directory.join(format!("script-{}-{}.ps1", job.attempt_id, grant));
|
||||
let mut file = OpenOptions::new()
|
||||
.create_new(true)
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
// Actual UI only. No page.request, fetch injection, approval API or DB access.
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
const crypto = require('node:crypto');
|
||||
const { isDeepStrictEqual } = require('node:util');
|
||||
const { chromium } = require('../../web/node_modules/playwright');
|
||||
const root = path.resolve(__dirname, '../..');
|
||||
const assert = (value) => { if (!value) throw new Error('UI contract mismatch'); };
|
||||
function checkWindowsScript(job, planBytes, expected) {
|
||||
const payload = job.payload;
|
||||
const stored = JSON.parse(Buffer.from(planBytes).toString('utf8'));
|
||||
assert(stored.jobs.length === 1 && isDeepStrictEqual(stored.jobs[0].payload, payload));
|
||||
assert(payload.tenant_id === '11111111-1111-4111-8111-111111111111'
|
||||
&& payload.agent_id === '63ea15b2-0643-403d-b5b4-cba1288dbea3'
|
||||
&& payload.asset_id === 'a176520e-8a91-4e93-a78b-8e7620f430e0');
|
||||
const a = payload.action;
|
||||
assert(a.action === 'run_script' && a.interpreter === 'powershell'
|
||||
&& a.windows_execution_profile === 'powershell_51_remote_signed'
|
||||
&& typeof expected.script_utf8 === 'string' && a.script_utf8 === expected.script_utf8
|
||||
&& Buffer.byteLength(a.script_utf8, 'utf8') <= 32768
|
||||
&& ['agent_service','system'].includes(payload.execution_identity));
|
||||
assert(payload.execution_identity !== 'system' || a.privileged_script_profile === 'full_maintenance_v1');
|
||||
assert(payload.execution_identity !== 'agent_service' || a.privileged_script_profile === undefined);
|
||||
assert(stored.jobs[0].job_payload_hash === job.job_payload_hash
|
||||
&& stored.jobs[0].script_sha256 === job.script_sha256
|
||||
&& crypto.createHash('sha256').update(a.script_utf8, 'utf8').digest('hex') === job.script_sha256);
|
||||
}
|
||||
(async () => {
|
||||
const file = path.resolve(process.argv[2]);
|
||||
const stat = fs.lstatSync(file);
|
||||
assert(stat.isFile() && !stat.isSymbolicLink() && stat.uid === process.getuid() && (stat.mode & 0o777) === 0o600);
|
||||
const expected = JSON.parse(fs.readFileSync(file, 'utf8'));
|
||||
assert(expected.profile === 'dev/test' && expected.case === 'windows_mvp_script');
|
||||
assert(expected.expected_principal === 'simulated-testprincipal-a');
|
||||
const loginFile = path.join(root, 'credentials/server-browser-login.json');
|
||||
const loginStat = fs.lstatSync(loginFile);
|
||||
assert(loginStat.isFile() && !loginStat.isSymbolicLink() && loginStat.uid === process.getuid() && (loginStat.mode & 0o777) === 0o600);
|
||||
const login = JSON.parse(fs.readFileSync(loginFile, 'utf8'));
|
||||
const cache = path.join(root, 'web/node_modules/.cache/cloud-acceptance');
|
||||
const browserRoot = path.join(root, 'web/node_modules/.cache/playwright-browsers');
|
||||
const version = fs.readdirSync(browserRoot).find(x => /^chromium-/.test(x));
|
||||
const candidates = ['chrome-linux/chrome', 'chrome-linux64/chrome'].map(x => path.join(browserRoot, version, x));
|
||||
const browser = await chromium.launch({ headless: true, executablePath: candidates.find(x => fs.existsSync(x)),
|
||||
env: { ...process.env, HOME: path.join(cache, 'home') } });
|
||||
try {
|
||||
const page = await browser.newPage({ ignoreHTTPSErrors: false });
|
||||
await page.goto('https://localhost:18443/');
|
||||
await page.getByLabel('Benutzername').fill(login.username);
|
||||
await page.getByLabel('Passwort', { exact: true }).fill(login.password);
|
||||
const sessionResponse = page.waitForResponse(r => new URL(r.url()).pathname === '/auth/session' && r.status() === 200);
|
||||
await page.getByRole('button', { name: 'Anmelden', exact: true }).click();
|
||||
const session = await (await sessionResponse).json();
|
||||
assert(session.testsimulation === true && session.approval_origin === 'dev_test_browser_simulation' && session.principal === expected.expected_principal);
|
||||
await page.getByRole('status').filter({ hasText: 'SIMULIERT' }).waitFor();
|
||||
await page.getByRole('button', { name: expected.operation_id, exact: true }).click();
|
||||
const op = page.locator('section').filter({ has: page.getByRole('heading', { name: 'Antrag / Ausführung ' + expected.operation_id, exact: true }) });
|
||||
const pending = JSON.parse(await op.locator('pre').first().innerText());
|
||||
assert(pending.approval_state === 'pending_approval' && pending.job_count === 0 && pending.execution_state === null);
|
||||
await op.getByRole('button', { name: 'Unveränderlichen Plan zur Prüfung öffnen', exact: true }).click();
|
||||
const detail = page.locator('section').filter({ has: page.getByRole('heading', { name: 'Unveränderlicher Plan / Genehmigungsdetail', exact: true }) });
|
||||
const rendered = JSON.parse(await detail.getByLabel('Alle festen Zielpreviews, exakte Skriptinhalte/Hashes, Parameter, Rechte, Fristen, Rollout und Nachbedingungen', { exact: true }).innerText());
|
||||
assert(rendered.plan_hash === expected.plan.plan_hash && crypto.createHash('sha256').update(Buffer.from(rendered.plan_payload_bytes)).digest('hex') === expected.plan.plan_hash);
|
||||
assert(JSON.stringify(rendered.plan_payload_bytes) === JSON.stringify(expected.plan.plan_payload_bytes));
|
||||
assert(rendered.jobs.length === 1 && rendered.resolved_targets.length === 1);
|
||||
const job = rendered.jobs[0]; const payload = job.payload;
|
||||
assert(job.job_payload_hash === expected.job.job_payload_hash && isDeepStrictEqual(payload, expected.job.payload));
|
||||
assert(payload.agent_id === expected.agent_id && payload.asset_id === expected.asset_id && payload.tenant_id === expected.tenant_id);
|
||||
assert(['agent_service','system'].includes(payload.execution_identity) && payload.max_runtime_seconds >= 1 && payload.max_runtime_seconds <= 120 && payload.max_output_bytes <= 65536);
|
||||
assert(Date.parse(payload.start_before) > Date.now());
|
||||
checkWindowsScript(job, rendered.plan_payload_bytes, expected);
|
||||
assert(expected.stage === 'pending_approval' && expected.preapproval.jobs === 0
|
||||
&& expected.preapproval.outbox === 0 && expected.preapproval.permits === 0);
|
||||
assert(pending.plan_id === rendered.plan_id && pending.operation_id === expected.operation_id);
|
||||
await detail.getByLabel('Feste PowerShell-Prozessprofile', { exact: true })
|
||||
.getByText('Asset: ' + payload.asset_id + ' · Windows PowerShell5.1 · ' + payload.execution_identity + ' · RemoteSigned · nur Jobprozess', { exact: true }).waitFor();
|
||||
const approve = detail.getByRole('button', { name: 'SIMULIERT: Diesen festen Plan ausdrücklich genehmigen', exact: true });
|
||||
assert(await approve.isDisabled());
|
||||
await detail.getByRole('checkbox', { name: 'Ich habe sämtliche festen Ziele', exact: false }).check();
|
||||
await approve.click();
|
||||
await op.locator('p.warning').filter({ hasText: 'Antrag: approved' }).waitFor();
|
||||
await page.getByRole('button', { name: 'Abmelden', exact: true }).click();
|
||||
} finally { await browser.close(); }
|
||||
})().catch(error => { console.log('CLOUD_UI_INCOMPLETE:' + error.constructor.name); process.exitCode = 1; });
|
||||
@@ -0,0 +1,317 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"scope": "first_actual_windows_SYSTEM_PowerShell_attempt",
|
||||
"date": "2026-11-16",
|
||||
"acceptance_passed": false,
|
||||
"operation_id": "ce1b969b-66b2-4548-a28c-7e81943507c4",
|
||||
"plan_id": "0ebc5db7-bcdc-430b-a243-7c79e1c1a5f4",
|
||||
"plan_hash": "9afc2bacefd937199bf6407c12b1f7c5cad933cd875514f651afcca9eb9fae43",
|
||||
"job_id": "94047873-5088-433b-bc1b-490d3eafe0da",
|
||||
"attempt_id": "f071e6d6-8635-42f7-92fa-533c681edd8b",
|
||||
"script_sha256": "880930d2b5d903a8ee8f4a9d3acad6162ef994b1822d7381c8468230bcf4a86c",
|
||||
"script_utf8": "$ErrorActionPreference = 'Stop'\r\n$sid = [Security.Principal.WindowsIdentity]::GetCurrent().User.Value\r\nif ($sid -cne 'S-1-5-18') { throw 'Expected SYSTEM process' }\r\nWrite-Output ('Windows-System-MVP:' + $sid)\r\n",
|
||||
"expected_stdout": "Windows-System-MVP:S-1-5-18\r\n",
|
||||
"execution_identity": "system",
|
||||
"preapproval": {
|
||||
"jobs": 0,
|
||||
"outbox": 0,
|
||||
"permits": 0,
|
||||
"unresolved": 0
|
||||
},
|
||||
"central": {
|
||||
"gate": {
|
||||
"jobs": 1,
|
||||
"outbox": 1,
|
||||
"permits": 1,
|
||||
"unresolved": 1
|
||||
},
|
||||
"audit": {
|
||||
"origin": "dev_test_browser_simulation",
|
||||
"simulation": true,
|
||||
"principal": "simulated-testprincipal-a",
|
||||
"plan_hash": "9afc2bacefd937199bf6407c12b1f7c5cad933cd875514f651afcca9eb9fae43"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"attempt_id": "f071e6d6-8635-42f7-92fa-533c681edd8b",
|
||||
"cancel_requested": false,
|
||||
"job_id": "94047873-5088-433b-bc1b-490d3eafe0da",
|
||||
"pending_reason": "reconciliation_required",
|
||||
"result": {
|
||||
"error_code": "SYNC_EFFECT_UNRESOLVED",
|
||||
"evidence": {
|
||||
"postconditions_passed": false
|
||||
},
|
||||
"exit_code": null,
|
||||
"grant_id": "97e705b8-fb2b-4158-84d9-d90595d1ce6e",
|
||||
"output_truncated": false,
|
||||
"reboot_required": false,
|
||||
"source_id": "authoritative_sync",
|
||||
"stderr": [],
|
||||
"stdout": []
|
||||
},
|
||||
"revision": 2,
|
||||
"state": "unknown"
|
||||
},
|
||||
"scope_activation": {
|
||||
"schema_version": 1,
|
||||
"activated": true,
|
||||
"case_id": "5fb6d7c9-d2b4-472c-b4fc-2ffea27e3c33",
|
||||
"expires_at": "2026-11-16T15:15:01.229153+00:00",
|
||||
"policy_sha256": "c4993009e62ef9c384ea11a2f201566c2e657c1ba3b452410bb2a9d4774b0169",
|
||||
"roles": {
|
||||
"api": {
|
||||
"container_id": "9e5643110ac1c860f98d594003884d5097dd345acb533cf51c9f53382503f82f",
|
||||
"image": "sha256:a7fc4243fee414ab6c85c5f4d207b6428005b77ab06903916138a83b4b74e1d4"
|
||||
},
|
||||
"gateway": {
|
||||
"container_id": "f543d60561ed4cc0db5ef928cc67667dab5cbc109f4b67fa1e9924198f290769",
|
||||
"image": "sha256:a7fc4243fee414ab6c85c5f4d207b6428005b77ab06903916138a83b4b74e1d4"
|
||||
}
|
||||
},
|
||||
"jobs_created": false,
|
||||
"approvals_created": false,
|
||||
"system_target_job_executed": false,
|
||||
"automatic_retry": false
|
||||
},
|
||||
"native_original_witness": {
|
||||
"agent": {
|
||||
"consumption_count": 1,
|
||||
"error_code": "SYSTEM_SCRIPT_EFFECT_UNRESOLVED",
|
||||
"evidence": {
|
||||
"postconditions_passed": false
|
||||
},
|
||||
"exit_code": null,
|
||||
"expected_stdout_matches": false,
|
||||
"finished_present": false,
|
||||
"original_boot_id": "a9ad0895-5a96-8f2c-8fb6-cfdc2d5225ea",
|
||||
"original_signature_verified": true,
|
||||
"outcome_count": 1,
|
||||
"outcome_equals_finished": false,
|
||||
"outcome_sha256": "1f284b66578d61c4364cc0060a67ce9b467e1d661ed8885804391b51a6f18b1a",
|
||||
"output_truncated": false,
|
||||
"request_sha256": "09aa6be3617017e4169f9d83fbfc4cbef43712513a02229a8360dd6a708ee69c",
|
||||
"reserved_at": "2026-11-16T15:03:57.014734800Z",
|
||||
"start_count": 1,
|
||||
"start_sha256": "f6134c00143b0939a92d2690b8c3a034d332d47241c65a812dcf8f78ead9cfcc",
|
||||
"state": "unknown",
|
||||
"stderr_bytes": 0,
|
||||
"stdout_bytes": 0,
|
||||
"stdout_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"agent_id": "63ea15b2-0643-403d-b5b4-cba1288dbea3",
|
||||
"asset_id": "a176520e-8a91-4e93-a78b-8e7620f430e0",
|
||||
"assignment_version": 1,
|
||||
"attempt_id": "f071e6d6-8635-42f7-92fa-533c681edd8b",
|
||||
"enrollment_generation": 1,
|
||||
"execution_requested": false,
|
||||
"grant_id": "97e705b8-fb2b-4158-84d9-d90595d1ce6e",
|
||||
"helper": {
|
||||
"consumption_count": 1,
|
||||
"error_code": "SYSTEM_SCRIPT_EFFECT_UNRESOLVED",
|
||||
"evidence": {
|
||||
"postconditions_passed": false
|
||||
},
|
||||
"exit_code": null,
|
||||
"expected_stdout_matches": false,
|
||||
"finished_present": false,
|
||||
"original_boot_id": "a9ad0895-5a96-8f2c-8fb6-cfdc2d5225ea",
|
||||
"original_signature_verified": true,
|
||||
"outcome_count": 1,
|
||||
"outcome_equals_finished": false,
|
||||
"outcome_sha256": "1f284b66578d61c4364cc0060a67ce9b467e1d661ed8885804391b51a6f18b1a",
|
||||
"output_truncated": false,
|
||||
"request_sha256": "09aa6be3617017e4169f9d83fbfc4cbef43712513a02229a8360dd6a708ee69c",
|
||||
"reserved_at": "2026-11-16T15:03:57.087305100Z",
|
||||
"start_count": 1,
|
||||
"start_sha256": "cf83fc9acbfc1429cca452498c44282f7748d852d73b8221bc0721af60e276d9",
|
||||
"state": "unknown",
|
||||
"stderr_bytes": 0,
|
||||
"stdout_bytes": 0,
|
||||
"stdout_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"helper_ledger_file_id": {
|
||||
"file_id": [
|
||||
239,
|
||||
142,
|
||||
3,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
3,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"volume_serial": 9815088561147542064
|
||||
},
|
||||
"intent": {
|
||||
"body_sha256": "31c9ddc35a7c09de9e8ec75c835e3dca9e8a816bc031b4b1c1396bd3a2ea46df",
|
||||
"cancel_requested": 0,
|
||||
"connection_generation": 221,
|
||||
"count": 1,
|
||||
"initialized": true,
|
||||
"mirror_outcome_sha256": "1f284b66578d61c4364cc0060a67ce9b467e1d661ed8885804391b51a6f18b1a",
|
||||
"original_boot_id": "a9ad0895-5a96-8f2c-8fb6-cfdc2d5225ea",
|
||||
"original_signature_verified": true,
|
||||
"phase": "may_have_dispatched",
|
||||
"recorded_at": "2026-11-16T15:03:57.014734800Z",
|
||||
"request_sha256": "09aa6be3617017e4169f9d83fbfc4cbef43712513a02229a8360dd6a708ee69c"
|
||||
},
|
||||
"intent_file_id": {
|
||||
"file_id": [
|
||||
163,
|
||||
143,
|
||||
3,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
3,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"volume_serial": 9815088561147542064
|
||||
},
|
||||
"job_id": "94047873-5088-433b-bc1b-490d3eafe0da",
|
||||
"local_job": [
|
||||
"unknown",
|
||||
"97e705b8-fb2b-4158-84d9-d90595d1ce6e"
|
||||
],
|
||||
"original_helper_file_ids_verified": true,
|
||||
"plan_hash": "9afc2bacefd937199bf6407c12b1f7c5cad933cd875514f651afcca9eb9fae43",
|
||||
"private_key_read": false,
|
||||
"public_binding_sha256": "9239ee9f4142735867e77451478bf309fbf449d730a0ede6c958bc8018830dde",
|
||||
"read_only": true,
|
||||
"schema_version": 1,
|
||||
"script_sha256": "880930d2b5d903a8ee8f4a9d3acad6162ef994b1822d7381c8468230bcf4a86c",
|
||||
"tenant_id": "11111111-1111-4111-8111-111111111111"
|
||||
},
|
||||
"native_readonly_sharing_probe": {
|
||||
"rows": [
|
||||
{
|
||||
"win32_error": 32,
|
||||
"share": 1,
|
||||
"opened": false
|
||||
},
|
||||
{
|
||||
"win32_error": 0,
|
||||
"share": 3,
|
||||
"opened": true
|
||||
}
|
||||
],
|
||||
"read_only": true,
|
||||
"new_files_created": false,
|
||||
"schema_version": 1,
|
||||
"helper_pid": 1304,
|
||||
"utc": "2026-11-16T15:15:04.2739993Z",
|
||||
"process_started": false
|
||||
},
|
||||
"last_original_sync_metadata": {
|
||||
"agent": {
|
||||
"checkpoint": 10784,
|
||||
"fault": null,
|
||||
"generation": 221,
|
||||
"helper_checkpoint": 413,
|
||||
"last_decision": "0442c732-8226-4c25-9615-7f007e24b269",
|
||||
"pending_request": null
|
||||
},
|
||||
"helper": {
|
||||
"agent_checkpoint": 10783,
|
||||
"checkpoint": 413,
|
||||
"fault": null,
|
||||
"generation": 221,
|
||||
"last_decision": "193b951b-a3aa-46e2-9f48-1a57f315078e"
|
||||
},
|
||||
"helper_decisions": [
|
||||
{
|
||||
"checkpoint": 412,
|
||||
"decision_id": "193b951b-a3aa-46e2-9f48-1a57f315078e",
|
||||
"request_bytes": 6901,
|
||||
"response_bytes": 12744
|
||||
},
|
||||
{
|
||||
"checkpoint": 411,
|
||||
"decision_id": "c4a6d90a-6568-4b83-a57a-444f98c12aab",
|
||||
"request_bytes": 6901,
|
||||
"response_bytes": 12737
|
||||
}
|
||||
],
|
||||
"jobs": [
|
||||
{
|
||||
"attempt_id": "78295f74-4565-459a-87b0-641a8b95feec",
|
||||
"grant_present": false,
|
||||
"job_id": "0a50aae9-a784-4535-b62f-ef24c301d546",
|
||||
"state": "expired"
|
||||
},
|
||||
{
|
||||
"attempt_id": "ebb387cf-ebb1-4609-a318-32f44d774d11",
|
||||
"grant_present": true,
|
||||
"job_id": "5f1ffef4-2bb6-4c7e-a3a0-fb619144b4f8",
|
||||
"state": "succeeded"
|
||||
},
|
||||
{
|
||||
"attempt_id": "e2ee25cd-0e23-4c3c-aaa2-3048d232622a",
|
||||
"grant_present": true,
|
||||
"job_id": "645ad11b-9ecd-4efe-8f92-8ad2fb6ed5cf",
|
||||
"state": "succeeded"
|
||||
},
|
||||
{
|
||||
"attempt_id": "f071e6d6-8635-42f7-92fa-533c681edd8b",
|
||||
"grant_present": true,
|
||||
"job_id": "94047873-5088-433b-bc1b-490d3eafe0da",
|
||||
"state": "unknown"
|
||||
}
|
||||
],
|
||||
"requests": [
|
||||
{
|
||||
"decoded": {
|
||||
"checkpoint": 10784,
|
||||
"helper_checkpoint": 413,
|
||||
"previous_decision_id": "193b951b-a3aa-46e2-9f48-1a57f315078e",
|
||||
"request_id": "09952f6d-45f3-4330-82f3-87ebf363eb3b"
|
||||
},
|
||||
"generation": 221,
|
||||
"request_bytes": 6901,
|
||||
"request_id": "09952f6d-45f3-4330-82f3-87ebf363eb3b",
|
||||
"response_present": true
|
||||
},
|
||||
{
|
||||
"decoded": {
|
||||
"checkpoint": 10783,
|
||||
"helper_checkpoint": 412,
|
||||
"previous_decision_id": "c4a6d90a-6568-4b83-a57a-444f98c12aab",
|
||||
"request_id": "f07ea08e-84f2-48f4-8476-6921057db9af"
|
||||
},
|
||||
"generation": 221,
|
||||
"request_bytes": 6901,
|
||||
"request_id": "f07ea08e-84f2-48f4-8476-6921057db9af",
|
||||
"response_present": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"original_witness_binary_sha256": "cd21eef628abe870ed3ca542b66de1d25efb3c6c1e2ce094de029efb8017449e",
|
||||
"retry_performed": false,
|
||||
"original_result_rewritten": false,
|
||||
"new_VM_identity_created": false,
|
||||
"scope_expired_at": "2026-11-16T15:15:01.229153+00:00",
|
||||
"source_receipts_sha256": {
|
||||
"system-first-job-pending-checkpoint.json": "91878a886c57a764f2ceb3309c77ed45837310fd937176960c232479b65302ce",
|
||||
"system-first-job-second-read.json": "6bf0cf2ee098cf3d5ed803b83c5def3ecac36e8270d6e4b1dcc03d73a507e13b",
|
||||
"system-first-job-central-evidence.json": "134a6ace402f5e47e0aeb6b333e2a062f213d0dfaaed099a8617a6704918a0d6",
|
||||
"system-script-directory-sharing-readonly.json": "72c9fece0c1f3ba62386614f230734154ff764e91aeeb1509f9f9257195adcde",
|
||||
"system-first-job-direct-sync-readonly.json": "9e243dc7e47af9e503edb6e72029731dd68adc09acaeba62f945dc973c24c3f1"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"sharing_fix_build": {
|
||||
"schema_version": 1,
|
||||
"compilation_source": "devstate/windows-system-script-sharing-fix/source",
|
||||
"base_compilation_source": "devstate/windows-helper-apply-fix/source",
|
||||
"builder": "sha256:1b2fd985d2c1fcc3545ace602405dc68fa899201bd8a73fa319ff96377203fa9",
|
||||
"target": "x86_64-pc-windows-gnu",
|
||||
"changed_files": {
|
||||
"crates/agent-windows/src/system_script.rs": {
|
||||
"before": "a3563e1aa8327b2e7046c7cdfb4f45ac213fec6ff7d477820ea2676a266c1695",
|
||||
"after": "6fb894c2dfb3f0895d0407ab80cd69e3b83fcb8349691af2c01027dcc2fcfc1b"
|
||||
}
|
||||
},
|
||||
"all_other_source_bytes_identical": true,
|
||||
"source_files": 251,
|
||||
"clippy_all_targets_D_warnings": true,
|
||||
"release_link": true,
|
||||
"postprocess": "x86_64-w64-mingw32-strip --strip-all",
|
||||
"artifacts": {
|
||||
"rmm-agent-windows.exe": "98dcafecfc19e57d8a07237ca6c1e15adccfebd5faac6be13855f09d4f2282d9",
|
||||
"rmm-helper-windows.exe": "325d2faf61aed9b6011f54bdd72a16b9979d62970e25df577fc0ca6da07c4446"
|
||||
},
|
||||
"unstripped_artifacts": {
|
||||
"rmm-agent-windows.exe": "47de97986c50f7000bf10b382e9f1b0eb59fdba49599560b350de63bea5cf312",
|
||||
"rmm-helper-windows.exe": "60915069bb43655534cf87134130ccbd58ec8da421194e3f131ee69ab0279243"
|
||||
},
|
||||
"clippy_log_sha256": "94bc9a70151a992231a23cd87521dce8aa8bb4824ea7ccb2d71de86a1acaed53",
|
||||
"build_log_sha256": "9cca3613dae2c47a7b11f3ed45589e151621f9eb06a8d7225dd26cacdfe4c9a1",
|
||||
"deployed": false,
|
||||
"new_job_executed": false
|
||||
},
|
||||
"sharing_fix_build_receipt_sha256": "f238392bc842b1c2e419c09cdc45c868384699f1ec82af7970e50434d5a57f6a",
|
||||
"original_readonly_witness_build": {
|
||||
"compilation_source": "devstate/windows-system-script-witness/source",
|
||||
"source_sha256": "7a5d4d9b4bd722b8bb3202b0e6789638175347c4672041b8ff6f4a6d79e36c3c",
|
||||
"builder": "sha256:1b2fd985d2c1fcc3545ace602405dc68fa899201bd8a73fa319ff96377203fa9",
|
||||
"target_cache": "devstate/windows-alignment-verify-target",
|
||||
"clippy_D_warnings": true,
|
||||
"build": true,
|
||||
"target_executed": true,
|
||||
"job_id": "94047873-5088-433b-bc1b-490d3eafe0da",
|
||||
"grant_id": "97e705b8-fb2b-4158-84d9-d90595d1ce6e",
|
||||
"example_name_in_actual_build": "windows_system_script_result_witness",
|
||||
"repo_source_alias": "crates/agent-windows/examples/windows_system_result_witness.rs",
|
||||
"repo_alias_sha256": "7a5d4d9b4bd722b8bb3202b0e6789638175347c4672041b8ff6f4a6d79e36c3c",
|
||||
"binary_sha256": "cd21eef628abe870ed3ca542b66de1d25efb3c6c1e2ce094de029efb8017449e",
|
||||
"raw_binary_sha256": "df888f33a593e967d93d066e47ce6470d719885dae35a6ba4e49765fa1c2f4e8",
|
||||
"postprocess": "x86_64-w64-mingw32-strip --strip-all",
|
||||
"native_executed": true,
|
||||
"native_report": "devstate/windows-system-script-witness/native-readonly-result.json",
|
||||
"native_report_sha256": "5cf471767a0b8e35db6a013dd690807bec7df942ba8a0d635e56f3b0c7fc054e",
|
||||
"result_scope": "read-only actual original UNKNOWN; no execution/no repair",
|
||||
"sdk_requested_job_execution": false,
|
||||
"repair_executed": false
|
||||
},
|
||||
"original_readonly_witness_receipt_sha256": "db1058750616dc706d70ebb16d600212072002a74a7647cf6bde5f8fa8012e2e",
|
||||
"new_tests_written": false,
|
||||
"fixed_pair_installed_on_VM": false,
|
||||
"successful_SYSTEM_job_after_fix": false
|
||||
}
|
||||
@@ -1,5 +1,21 @@
|
||||
# Übergabe — Linux-MVP abgeschlossen, Windows wird fortgesetzt
|
||||
|
||||
**16. November: erste SYSTEM-Skriptabnahme versucht, NICHT bestanden.**
|
||||
MCP-Antrag ce1b969b… und echte sichtbar simulierte WebUI-Genehmigung bestanden;
|
||||
vorher 0/0/0, danach genau ein Job, eine Auslieferung und ein Grant.
|
||||
Originaljob94047873…/Grant97e705b8… bleibt Unknown. Nativer Readonlyzeuge bestätigt
|
||||
beiderseits einen Verbrauch, Start und Outcome, SYSTEM_SCRIPT_EFFECT_UNRESOLVED,
|
||||
leere Ausgabe und Exitnull; kein Retry oder Historyreset.
|
||||
Ursache konkret belegt: system_script öffnet STATE_ROOT nur mit ShareRead,
|
||||
während Helper1304 denselben Ordner dauerhaft schreibfähig hält. Native
|
||||
Leseprobe: Error32; ShareRead|Write positiv. Enger Fix open_read_shared
|
||||
vorbereitet, noch nicht installiert. Kontrollspalt221 mit Agent0442c732… und
|
||||
Helper193b951b… erhalten; Policy seit16:15:01MEZ abgelaufen. Die frühere
|
||||
205-Ausnahme deckt diesen neuen Unknownfall nicht ab.
|
||||
[Originalversuch und Grenzen](windows-system-script-first-attempt.md) ·
|
||||
[Gesonderter Abschlussvorschlag](windows-system-script-nonstart-221-proposal.md).
|
||||
Weitere MVP-/Linuxarbeit wegen aktuellem Userfokus angehalten; keine Neustarts.
|
||||
|
||||
**16. November, 14:54UTC: SYSTEM-Skriptvoraussetzungen nativ positiv.**
|
||||
Die eng gebundene NoEffect-Fortsetzung installierte um14:31UTC vier öffentliche
|
||||
Dateien erhaltend und stellte den Helper aufAutomatic. Unabhängiger Hash-/ACL-
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
# Erster SYSTEM-Auftrag: Voraussetzungen und eng begrenzte Vorbereitung
|
||||
|
||||
Stand 16. November 2026. Dieser Schritt bereitet die erste tatsächliche
|
||||
SYSTEM-Skriptabnahme vor. **Es wurde noch kein SYSTEM-Auftrag ausgeführt. Die lokale eng begrenzte
|
||||
Skriptpolicy ist inzwischen installiert; der zentrale Scope ist noch nicht aktiviert.** Die vorhandenen
|
||||
Stand 16. November 2026. **Die spätere tatsächliche SYSTEM-Abnahme wurde
|
||||
versucht und ist nicht bestanden.** Der einzige genehmigte Versuch bleibt
|
||||
Unknown; ein Sharingfehler vor der Skriptdateianlage ist nativ belegt.
|
||||
[Maßgeblicher aktueller Ergebnisstand](windows-system-script-first-attempt.md).
|
||||
Die folgenden Voraussetzungen dokumentieren die vorherigen Schritte;
|
||||
LocalService-PowerShell-Ergebnisse bleiben separate Nachweise.
|
||||
|
||||
## Tatsächliche Installation und frische Bereitschaft am 16. November
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
# Erster tatsächlicher Windows-SYSTEM-Skriptversuch
|
||||
|
||||
16. November 2026. **Nicht bestanden.** MCP-Antrag und tatsächliche sichtbar
|
||||
simulierte WebUI-Genehmigung wurden ausgeführt; der Originalversuch steht
|
||||
weiterhin auf `unknown`. Kein Retry und keine Erfolgskorrektur wurden vorgenommen.
|
||||
|
||||
Der feste Plan `0ebc5db7-bcdc-430b-a243-7c79e1c1a5f4` gehört zum Antrag
|
||||
`ce1b969b-66b2-4548-a28c-7e81943507c4`, Job
|
||||
`94047873-5088-433b-bc1b-490d3eafe0da`, Versuch
|
||||
`f071e6d6-8635-42f7-92fa-533c681edd8b`, Originalgrant
|
||||
`97e705b8-fb2b-4158-84d9-d90595d1ce6e`. Das Skript prüft die tatsächliche
|
||||
Windows-Identität auf SID18 und soll ausschließlich
|
||||
`Windows-System-MVP:S-1-5-18` ausgeben. RemoteSigned gilt nur für den
|
||||
genehmigten PowerShell5.1-Prozess. Keine Dienst-, Paket- oder Neustartaktion.
|
||||
|
||||
## Tatsächliche Genehmigungs- und Ausführungskette
|
||||
|
||||
Vor dem echten UI-Klick bestanden null Jobs, Outboxeinträge und Startgrants
|
||||
für diesen festen Versuch. Anschließend bestanden genau ein Job, eine
|
||||
Auslieferung und ein Grant. Der Audit bindet denselben Planhash an
|
||||
`dev_test_browser_simulation`, `testsimulation=true` und
|
||||
`simulated-testprincipal-a`. Es gab keinen direkten Freigabe-API-/DB-Aufruf.
|
||||
|
||||
Der unabhängig gebaute und auf Windows tatsächlich ausgeführte reine
|
||||
Lesezeuge `cd21eef6…` bestätigt auf beiden Originalledgern genau einen
|
||||
Verbrauch, einen Startzeugen und ein Outcome. Beide Originalsignaturen und
|
||||
derselbe Requesthash stimmen. Der Helperstartzeuge wurde um16:03:57MEZ
|
||||
geschrieben. Beide Outcomes enthalten `SYSTEM_SCRIPT_EFFECT_UNRESOLVED`,
|
||||
null Exitcode und leere Ausgaben. `consumed.result` ist jeweils nochNULL;
|
||||
das Agentintent steht auf `may_have_dispatched` und bindet den gleichen
|
||||
gespiegelten Outcomehash. Ein Startzeuge des Helpers ist kein Nachweis eines
|
||||
tatsächlich gestarteten PowerShell-Kindprozesses.
|
||||
|
||||
## Konkreter Fehler und enger Fix
|
||||
|
||||
Der installierte Helper0502 hält sein Zustandsverzeichnis seit seinem Start
|
||||
mit `GENERIC_READ | GENERIC_WRITE` und `FILE_SHARE_READ | FILE_SHARE_WRITE`.
|
||||
`system_script::execute` öffnet genau dieses Verzeichnis erneut, fordert aber
|
||||
vor dem Erstellen der Skriptdatei ausschließlich `FILE_SHARE_READ`. Dieser
|
||||
zweite Open ist mit dem bestehenden Writerhandle unvereinbar.
|
||||
|
||||
Eine tatsächliche rein lesende Windowsprobe am unveränderten laufenden
|
||||
HelperPID1304 um16:15:04MEZ bestätigte die Windows-Semantik:
|
||||
|
||||
- gewünschter Zugriff `GENERIC_READ`, ShareRead: Fehler32/SharingViolation;
|
||||
- derselbe gewünschte Zugriff, ShareRead|ShareWrite: erfolgreich geöffnet.
|
||||
|
||||
Die Probe legte keine Datei an und führte kein Skript aus. Die Quellreihenfolge
|
||||
platziert die fehlerhafte Öffnung vor Skriptdatei und Kindprozessstart. Die
|
||||
historischen Journale selbst speichern jedoch nur den generischen Fehler;
|
||||
sie werden deshalb nicht durch eine nachträgliche Erfolgs- oder Nichtstart-
|
||||
behauptung überschrieben.
|
||||
|
||||
Der Fix verwendet nur für diese Verzeichnisöffnung die vorhandene
|
||||
`PinnedFile::open_read_shared`-Funktion. Gewünschter Zugriff bleibt nur lesend;
|
||||
Delete-Sharing, Dateiidentität, ACL-Prüfung und Genehmigungsgrenzen bleiben
|
||||
unverändert. Build und Installation des korrigierten Paares sind getrennte
|
||||
Nachweise. Die tatsächliche erfolgreiche SYSTEM-Skriptabnahme steht weiterhin aus.
|
||||
|
||||
Der GNU-Alltargets-Clippy-Lauf mit `-D warnings` und beide Releasebuilds der
|
||||
engen Ableitung sind tatsächlich bestanden. Von251 eingefrorenen Quelldateien
|
||||
wurde ausschließlich diese eine Zeile geändert. Neuer Agent98dcafec…,
|
||||
Helper325d2faf…; gebaut im vorhandenen isolierten Builder, nicht auf der VM
|
||||
installiert und kein MSVC-Release. Es wurden keine zusätzlichen Tests geschrieben.
|
||||
[Buildnachweise und tatsächlicher Readonlyzeuge](evidence/windows-system-script-sharing-fix-build-20261116.json).
|
||||
|
||||
## Erhaltener Sperrstand
|
||||
|
||||
Der letzte native Readonlyzeuge zeigt zusätzlich den Kontrollspalt in
|
||||
Verbindung221: Agentcheckpoint10784/Entscheidung0442c732…, Helpercheckpoint413/
|
||||
Entscheidung193b951b…, Agentcheckpoint des Helpers10783. Beide Faultfelder
|
||||
sindNULL. Originalrequests und Antworten sind erhalten. Die alte ausdrücklich
|
||||
auf Verbindung205 und null unbekannte Wirkungen begrenzte Reparaturfreigabe
|
||||
deckt diesen neuen Fall nicht ab.
|
||||
|
||||
Die zentrale Skriptpolicy lief am16.November um16:15:01MEZ ab. Die spätere
|
||||
lesende Serverprüfung bestätigte den Ablauf und weiterhin genau einen Job
|
||||
und einen Grant mit Zustand `unknown`. Keine Frist wurde verlängert, keine
|
||||
Identität ersetzt, kein Journal gelöscht und kein Neustart ausgeführt.
|
||||
|
||||
[Öffentliche Originalnachweise](evidence/windows-system-script-attempt-20261116.json).
|
||||
[Konkreter gesonderter Abschlussvorschlag](windows-system-script-nonstart-221-proposal.md).
|
||||
@@ -0,0 +1,44 @@
|
||||
# Vorschlag: genau den gescheiterten SYSTEM-Testversuch erhalten und abschließen
|
||||
|
||||
**Vorgeschlagen, nicht freigegeben oder ausgeführt.** Ausschließlich die
|
||||
bestehende Windows-Testidentität, Job94047873…, Versuchf071e6d6… und
|
||||
Grant97e705b8… aus dem [tatsächlichen Fehlerbeleg](windows-system-script-first-attempt.md).
|
||||
Keine allgemeine Wiederherstellungs-, Retry- oder Produktionsausnahme.
|
||||
|
||||
Der belegte Sharingfehler liegt im installierten Code vor Skriptdatei und
|
||||
CreateProcess. Der Originalhelperprozess und sein dauerhaft gehaltener
|
||||
Writerhandle sind vor einem Abschluss unabhängig erneut zu binden. Die
|
||||
vorhandenen Journale enthalten bereits ein unveränderliches Unknown-Outcome;
|
||||
der administrative Abschluss darf dieses nicht durch erfundene historische
|
||||
Ergebnisse ersetzen.
|
||||
|
||||
Der konkrete erlaubte Ablauf wäre:
|
||||
|
||||
1. Originalgrant, Signatur, Geräte-/Boot-/Prozess-/Dateiidentitäten, genau die
|
||||
beiden Starts und Unknown-Outcomes, das Intent und die ursprünglichen
|
||||
Abgleichantworten unabhängig prüfen und unveränderlich archivieren.
|
||||
Den Codepfad und die tatsächliche ShareMode-Probe als eigene zusätzliche
|
||||
Nichtstartbeweiskette binden. Fehlende oder abweichende Belege verweigern.
|
||||
2. Einen getrennten administrativen Abschlussbeleg für genau diesen Versuch
|
||||
und den Kontrollspalt221 in der tatsächlichen WebUI anzeigen und mit dem
|
||||
sichtbar simulierten Testprincipal bestätigen. Kein Job- oder Startrecht
|
||||
entsteht durch diesen Beleg.
|
||||
3. Einen nachvollziehbaren historienerhaltenden Abschluss hinzufügen: der
|
||||
ursprüngliche generische Unknown-Beleg bleibt unverändert erhalten; der
|
||||
zusätzliche geprüfte Abschluss weist ausschließlich den fehlgeschlagenen
|
||||
Nichtstart aus, niemals Erfolg. Auch die alten Kontrollantworten bleiben
|
||||
erhalten. Keine alte Lease oder historische Uhr wird als aktuell benutzt.
|
||||
4. Die eng korrigierten Binaries identitäts- und historienerhaltend installieren
|
||||
und beide Rollen erneut durch den regulären frischen signierten Abgleich
|
||||
führen. Ohne vollständig bestätigten Abschluss bleibt die Ausführung gesperrt.
|
||||
5. Erst danach einen neuen festen MCP-Plan mit eigenem Versuch und eigener
|
||||
tatsächlicher WebUI-Genehmigung für dasselbe harmlose Identitätsskript
|
||||
anlegen. Keinen alten Grant erneut verwenden oder ausliefern.
|
||||
|
||||
Kapitel0 der Spezifikation1.28 begrenzt die bisherige zusätzliche Ausnahme
|
||||
ausdrücklich auf Verbindung205 und verlangt dort: „Kein weiterer Verbrauch,
|
||||
SYSTEM-Intent, offener oder unbekannter Effekt darf vorliegen.“ Dieser neue
|
||||
Fall erfüllt diese Bedingung nicht. Deshalb ist vor Umsetzung dieses
|
||||
administrativen Abschlusses eine neue ausdrückliche Betreiberentscheidung
|
||||
nötig. Der einzeilige Sharingfix und die lesende Fehlerdiagnose benötigen
|
||||
diese zusätzliche Ausnahme nicht.
|
||||
Reference in New Issue
Block a user