stepsecurity-dev-machine-guard-task

command
v1.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2026 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Rendered for windows/amd64

Overview

Command stepsecurity-dev-machine-guard-task is a GUI-subsystem launcher that invokes a console-subsystem child under CREATE_NO_WINDOW. Built with `-ldflags "-H windowsgui"`.

Why a separate binary: Windows allocates a console for any console-subsystem process whose parent has none. Task Scheduler under /ru INTERACTIVE is such a parent, so a console-subsystem child invoked directly would always flash a window. The only fully reliable suppression is for the parent CreateProcess call to pass CREATE_NO_WINDOW, and the only way to be that parent without flashing our own console is to be GUI-subsystem.

Two operating modes (target-resolution lives in internal/launcher so it can be unit-tested cross-platform):

  • Default. Invoked without --exec, the launcher spawns its sibling stepsecurity-dev-machine-guard.exe and forwards argv unchanged. This is what the MSI install layout's scheduled-task action uses.

  • --exec mode. Invoked as `task.exe --exec <exe> [args...]`, the launcher spawns <exe> (exec.LookPath resolved) with the remaining args. Used by the PowerShell loader's scheduled task to wrap `powershell.exe -File loader.ps1 send-telemetry` in the same no-console envelope the MSI flow uses for the agent.

The agent (and any --exec target) stays console-subsystem so interactive CLI use continues to work normally.

Lifecycle: the child is assigned to a Job Object with JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE so it dies when the launcher does — including under Stop-ScheduledTask, which only terminates the registered action's PID.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL