Documentation
¶
Overview ¶
Package endpoint hosts the `vet endpoint` cobra subcommand tree. The scan subcommand wires the inventory pipeline (pkg/inventory) into the CLI: scanners discover endpoint inventory, sinks render it locally and (when credentials are configured) ship it to SafeDep Cloud via endpointsync.
Index ¶
Constants ¶
const DefaultDrainTimeout = 30 * time.Second
DefaultDrainTimeout is the default `--drain-timeout` value and the fallback applied when Options.DrainTimeout is zero.
Variables ¶
This section is empty.
Functions ¶
func NewEndpointCommand ¶
NewEndpointCommand returns the `vet endpoint` cobra subcommand tree. Today the only child is `scan`; future commands (e.g. `endpoint status`) attach here as the surface grows.
Types ¶
type Options ¶
type Options struct {
// Scopes restricts discovery to a subset of inventory scopes; nil
// means "all scopes enabled" (mirrors aitool.DiscoveryConfig).
Scopes []string
// ProjectDir overrides the project root for project-scoped scans;
// empty defaults to the process's cwd.
ProjectDir string
// ReportJSON, when non-empty, instructs LocalSink to marshal the
// accumulated items to the supplied path on End.
ReportJSON string
// Silent suppresses the local table render at end-of-scan.
Silent bool
// Kinds is the scanner-kind allowlist; nil/empty means "all
// registered kinds". Set directly by `vet endpoint scan`'s --kind
// flag; overwritten by alias entrypoints.
Kinds []string
// DrainTimeout bounds CloudSink.Close's wait for pending events to
// ship. Zero falls back to DefaultDrainTimeout.
DrainTimeout time.Duration
}
Options is the public surface common to `vet endpoint scan` and the aliases that re-export it. cobra binds this directly. Aliases that pin a specific scanner kind (e.g. RunAITool) overwrite Options.Kinds before invoking the shared pipeline; callers of an alias entrypoint do not need to set Kinds; it is overwritten.