feat: add approval bound full maintenance script console and executors
Rust development slice / linux (push) Failing after 6s

This commit is contained in:
2026-11-14 16:35:11 +01:00
parent 287a784c8f
commit ff78b6a498
51 changed files with 8880 additions and 278 deletions
+5 -2
View File
@@ -15,7 +15,7 @@ use std::{
/// native clock/boot/job qualification; this constant grants no capability.
pub const REMOTE_SIGNED_PROFILE_CAPABILITY: &str = "script.powershell.process_remote_signed/1";
fn script_arguments(job: &JobPayload, path: &Path) -> Result<Vec<OsString>> {
pub(crate) fn script_arguments(job: &JobPayload, path: &Path) -> Result<Vec<OsString>> {
let Action::RunScript {
interpreter,
arguments,
@@ -26,7 +26,9 @@ fn script_arguments(job: &JobPayload, path: &Path) -> Result<Vec<OsString>> {
anyhow::bail!("SCRIPT_REQUIRED")
};
ensure!(
job.execution_identity == "agent_service"
(job.execution_identity == "agent_service"
|| (job.execution_identity == "system" && job.action.full_maintenance()))
&& job.action.valid_execution_identity(&job.execution_identity)
&& interpreter == "powershell"
&& job.action.validate(),
"WINDOWS_SCRIPT_PROFILE_BINDING"
@@ -303,6 +305,7 @@ mod tests {
arguments: vec!["-ExecutionPolicy".into(), "Bypass".into()],
expected_stdout: None,
windows_execution_profile: None,
privileged_script_profile: None,
},
execution_identity: "agent_service".into(),
not_before: now,