Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run executes enterprise telemetry: scan, build payload, upload to S3. Output format matches the shell script's sample_log:
========================================== StepSecurity Device Agent v1.9.0 ========================================== [scanning] Lock acquired (PID: 32560) [scanning] Device ID (Serial): ... ...
Types ¶
type ExecutionLogs ¶
type LogCapture ¶
type LogCapture struct {
// contains filtered or unexported fields
}
LogCapture captures all stderr output during telemetry execution. The captured output is base64-encoded and included in the execution_logs payload.
func StartCapture ¶
func StartCapture() *LogCapture
StartCapture redirects stderr to a tee that writes to both the original stderr and an in-memory buffer for later base64 encoding.
func (*LogCapture) Finalize ¶
func (lc *LogCapture) Finalize() string
Finalize stops capture and returns the base64-encoded output. Safe to call multiple times — subsequent calls return the cached result.
func (*LogCapture) Fprintf ¶
func (lc *LogCapture) Fprintf(format string, args ...any)
Fprintf is a convenience method.
type Payload ¶
type Payload struct {
CustomerID string `json:"customer_id"`
DeviceID string `json:"device_id"`
SerialNumber string `json:"serial_number"`
UserIdentity string `json:"user_identity"`
Hostname string `json:"hostname"`
Platform string `json:"platform"`
OSVersion string `json:"os_version"`
AgentVersion string `json:"agent_version"`
CollectedAt int64 `json:"collected_at"`
NoUserLoggedIn bool `json:"no_user_logged_in"`
IDEExtensions []model.Extension `json:"ide_extensions"`
IDEInstallations []model.IDE `json:"ide_installations"`
NodePkgManagers []model.PkgManager `json:"node_package_managers"`
NodeGlobalPackages []model.NodeScanResult `json:"node_global_packages"`
NodeProjects []model.NodeScanResult `json:"node_projects"`
AIAgents []model.AITool `json:"ai_agents"`
MCPConfigs []model.MCPConfigEnterprise `json:"mcp_configs"`
ExecutionLogs *ExecutionLogs `json:"execution_logs,omitempty"`
PerformanceMetrics *PerformanceMetrics `json:"performance_metrics,omitempty"`
}
Payload is the enterprise telemetry JSON structure.