Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Command string // "", "install", "uninstall", "send-telemetry", "configure", "configure show", "hooks install", "hooks uninstall"
OutputFormat string // "pretty", "json", "html"
OutputFormatSet bool // true if --pretty/--json/--html was explicitly passed (not persisted)
HTMLOutputFile string // set by --html (not persisted)
ColorMode string // "auto", "always", "never"
Verbose bool // --verbose (shortcut for --log-level=debug)
LogLevel string // "" = unset; one of "error", "warn", "info", "debug"
InstallDir string // --install-dir=DIR base install directory; all non-bootstrap files (logs, hook errors, binary placement) live under this dir. "" w/ InstallDirSet=true means "explicitly disabled" (no file logging).
InstallDirSet bool // true if --install-dir was passed (empty value = disable file logging for this run)
EnableNPMScan *bool // nil=auto, true/false=explicit
UseLegacyNodeScan *bool // nil=auto (disk scan); true=command path, false=disk path
EnableBrewScan *bool // nil=auto, true/false=explicit
EnablePythonScan *bool // nil=auto, true/false=explicit
UseLegacyPythonScan *bool // nil=auto (disk scan); true=pip path, false=disk path
IncludeBundledPlugins bool // --include-bundled-plugins: include bundled/platform plugins in output
// IncludeTCCProtected is tristate: nil or false = skip the macOS
// TCC-protected dirs (Documents, Downloads, ~/Library/Mail, ...)
// so the agent never triggers permission prompts; true = scan them.
// Customers who have granted the agent Full Disk Access (e.g., via
// an MDM-pushed PPPC profile) flip this to true to opt back into
// full scan coverage. See docs/macos-tcc-permissions.md.
IncludeTCCProtected *bool
NPMRCOnly bool // --npmrc: run only the npmrc audit and render verbose pretty output
PipConfigOnly bool // --pipconfig: run only the pip config audit and render verbose pretty output
PnpmRCOnly bool // --pnpmrc: run only the pnpm config audit and render verbose pretty output
BunfigOnly bool // --bunfig: run only the bun config audit and render verbose pretty output
YarnRCOnly bool // --yarnrc: run only the yarn config audit (both flavors) and render verbose pretty output
SearchDirs []string // defaults to ["$HOME"]
// HooksAgent is the --agent value on `hooks install` / `hooks uninstall`;
// "" means "every detected agent".
HooksAgent string
// Non-interactive `configure` inputs. Used by MSI/SCCM and other
// orchestrators that can't drive a stdin prompt loop. NonInteractive
// is implied when any of ConfigFromFile / ConfigCustomerID /
// ConfigAPIEndpoint / ConfigAPIKey / ConfigScanFrequency is set,
// and main.go routes accordingly.
NonInteractive bool
ConfigFromFile string // --from-file: read full config JSON from path
ConfigCustomerID string // --customer-id
ConfigAPIEndpoint string // --api-endpoint
ConfigAPIKey string // --api-key (also accepts env var DMG_API_KEY)
ConfigScanFrequency string // --scan-frequency (hours)
// IgnoreTelemetryError opts the `install` subcommand into treating an
// initial-telemetry POST failure as a warning rather than a fatal exit.
// Default behavior (flag absent) preserves dev-workflow ergonomics —
// a failed first telemetry surfaces misconfigurations immediately. MSI
// custom actions and other unattended orchestrators set this so a
// transient network hiccup doesn't roll back the whole install.
IgnoreTelemetryError bool
// OverrideGate disables feature gating for this invocation, letting
// every capability run regardless of the featuregate allowlist.
// Internal — not advertised in --help. Equivalent env var:
// STEPSECURITY_OVERRIDE_GATE=1.
OverrideGate bool
// RulesFile makes the malicious-file detection engine load its RuleSet
// from a local JSON file instead of fetching it from the backend.
// Dev-only — not advertised in --help. Equivalent env var:
// STEPSECURITY_RULES_FILE=PATH. Lets the engine be exercised offline
// (rules live only in the backend, so an offline run would otherwise scan
// nothing). Zero production impact when unset.
RulesFile string
// TelemetryOutFile makes an enterprise run write the assembled telemetry
// Payload to a local JSON file and skip the S3 upload + run-status notify.
// Dev-only — not advertised in --help. Equivalent env var:
// STEPSECURITY_TELEMETRY_OUT=PATH. The dumped file is exactly what the
// backend's process-uploaded sees after gunzip, so it doubles as a backend
// ingestion fixture. Zero production impact when unset.
TelemetryOutFile string
}
Config holds all parsed CLI flags.
The hidden `_hook` runtime is intentionally NOT represented here. Agents invoke `_hook` on every event and any non-zero exit is treated as a hook failure, so the hot path bypasses cli.Parse entirely — see main.go's early-return and internal/aiagents/cli.RunHook.