{"modulePath":"github.com/step-security/dev-machine-guard","version":"v1.19.1","isLatest":true,"isStandardLibrary":false,"goos":"windows","goarch":"amd64","docs":"# package main\n\nCommand 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\"\\`.\n\nWhy 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.\n\nTwo operating modes (target-resolution lives in internal/launcher so it can be unit-tested cross-platform):\n\n  - 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.\n\n  - \\--exec mode. Invoked as \\`task.exe --exec \\\u003cexe\u003e \\[args...]\\`, the launcher spawns \\\u003cexe\u003e (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.\n\n  - Bootstrap mode. Invoked under the file name stepsecurity-dev-machine-guard-bootstrap.exe (the MSI installs a second copy of this launcher under that name), the verbs run / update / adopt-seed resolve the self-update state.json pointer and launch the versioned binaries. See internal/launcher/bootstrap.go.\n\nWhen launched by the bootstrap (STEPSEC\\_BOOTSTRAP\\_VERSION set), failing to resolve or start the agent exits 70 so the run counts as bad (D5); other invocations keep their legacy exit codes.\n\nThe agent (and any --exec target) stays console-subsystem so interactive CLI use continues to work normally.\n\nLifecycle: 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.\n\n","path":"github.com/step-security/dev-machine-guard/cmd/stepsecurity-dev-machine-guard-task","name":"main","synopsis":"Command stepsecurity-dev-machine-guard-task is a GUI-subsystem launcher that invokes a console-subsystem child under CREATE_NO_WINDOW.","isRedistributable":true}
