Documentation
¶
Index ¶
- func PrintCapabilities(out io.Writer, report CapabilityReport, lang i18n.Locale)
- func RunWithOptions(out io.Writer, opts Options) (runErr error)
- type CapabilityReport
- type CaptureBufferReport
- type Options
- type ProbeCapability
- type ProcfsIdentityReport
- type StateCollectionCapability
- type TLSDiscoveryReport
- type TLSEventDiscoveryReport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintCapabilities ¶ added in v0.8.2
func PrintCapabilities(out io.Writer, report CapabilityReport, lang i18n.Locale)
PrintCapabilities renders a snapshot without rewriting fields that consumers persist as evidence. It also works with reports loaded from previous runs.
Types ¶
type CapabilityReport ¶ added in v0.8.0
type CapabilityReport struct {
CaptureBuffers *CaptureBufferReport `json:"capture_buffers,omitempty"`
SchemaVersion string `json:"schema_version"`
UpdatedAt string `json:"updated_at"`
Ready bool `json:"ready"`
Status string `json:"status"` // starting, ready, degraded, stopped, or failed
Reason string `json:"reason,omitempty"`
Probes []ProbeCapability `json:"probes"`
TLSDiscovery TLSDiscoveryReport `json:"tls_discovery"`
AccessControlState *StateCollectionCapability `json:"access_control_state,omitempty"`
ProcfsIdentity *ProcfsIdentityReport `json:"procfs_identity,omitempty"`
}
type CaptureBufferReport ¶ added in v0.10.1
type Options ¶ added in v0.3.0
type Options struct {
// RingBufferMiB is a power of two from 1 to 256; zero selects 64 MiB.
RingBufferMiB int
// TLSTargets are known OpenSSL/BoringSSL libraries or Go executables to
// attach before readiness. Paths are refreshed after atomic replacement.
TLSTargets []string
SSLLib string
LibcLib string
GoTLSBin string
Context context.Context
OnReady func()
// AutoTLS scans visible processes, including container mount namespaces,
// for mapped OpenSSL libraries and Go TLS executables. Bounded event-driven
// discovery supplements polling; first use can still precede attachment.
AutoTLS bool
TLSScanInterval time.Duration
TLSMaxTargets int
TLSMaxProcesses int
// State readers use procfs independently of eBPF. Snapshots are timestamped
// observations of a task, never syscall verdicts or kernel lifetime aliases.
AppArmorState bool
SeccompState bool
// Diagnostics receives capability changes as JSON prefixed with
// "agentprov-sensor: capabilities ". Nil defaults to stderr.
Diagnostics io.Writer
// Language controls additional human diagnostics. Protocol lines and the
// capability callback remain unchanged, including their original reasons.
Language i18n.Locale
// OnCapabilities receives bounded snapshots on state changes. Callbacks must
// return promptly; callers may persist the latest snapshot for health APIs.
OnCapabilities func(CapabilityReport)
}
Options configures the native sensor. Optional probe failures are reported as degraded coverage; OnReady only promises the required syscall probes and the ring-buffer reader are active, not that every TLS implementation is covered.
type ProbeCapability ¶ added in v0.8.0
type ProcfsIdentityReport ¶ added in v0.10.1
type StateCollectionCapability ¶ added in v0.10.0
type TLSDiscoveryReport ¶ added in v0.8.0
type TLSDiscoveryReport struct {
Enabled bool `json:"enabled"`
ScanIntervalMS int64 `json:"scan_interval_ms"`
MaxTargets int `json:"max_targets"`
MaxProcessesPerScan int `json:"max_processes_per_scan"`
ActiveTargets int `json:"active_targets"`
ScanComplete bool `json:"scan_complete"`
ProcessesScanned int `json:"processes_scanned"`
UnreadableProcesses int `json:"unreadable_processes"`
UnresolvedMounts int `json:"unresolved_mounts"`
TruncatedMaps int `json:"truncated_maps"`
SkippedTargets int `json:"skipped_targets"`
UnsupportedExecutables int `json:"unsupported_executables"`
Reason string `json:"reason,omitempty"`
Limitations []string `json:"limitations"`
SweepPasses uint64 `json:"sweep_passes"`
EventDiscovery *TLSEventDiscoveryReport `json:"event_discovery,omitempty"`
}
func (TLSDiscoveryReport) HasGaps ¶ added in v0.10.1
func (d TLSDiscoveryReport) HasGaps() bool
HasGaps includes discovery failures, not normal process exits or PID/exec changes. Counters in EventDiscovery cover the sensor lifetime.
type TLSEventDiscoveryReport ¶ added in v0.10.1
type TLSEventDiscoveryReport struct {
QueueCapacity int `json:"queue_capacity"`
Pending int `json:"pending"`
Hints uint64 `json:"hints"`
Coalesced uint64 `json:"coalesced"`
QueueDrops uint64 `json:"queue_drops"`
ProcessScans uint64 `json:"process_scans"`
RetryScans uint64 `json:"retry_scans"`
ExitedProcesses uint64 `json:"exited_processes"`
ChangedProcesses uint64 `json:"changed_processes"`
UnreadableProcesses uint64 `json:"unreadable_processes"`
UnresolvedMounts uint64 `json:"unresolved_mounts"`
TruncatedMaps uint64 `json:"truncated_maps"`
UnsupportedExecutables uint64 `json:"unsupported_executables"`
SkippedTargets uint64 `json:"skipped_targets"`
AttachedTargets uint64 `json:"attached_targets"`
LastAttachLatencyMS int64 `json:"last_attach_latency_ms"`
MaxAttachLatencyMS int64 `json:"max_attach_latency_ms"`
}
Source Files
¶
- access_state.go
- argv.go
- capabilities.go
- elf_limits_linux.go
- gen.go
- gotls_attach_linux_amd64.go
- gotls_linux_amd64.go
- gotls_symbols_linux.go
- identity_linux.go
- language.go
- openssl_dynamic_linux.go
- options.go
- procfs_linux.go
- procfs_linux_amd64.go
- ring_reader_linux.go
- sensor_linux.go
- sensorbpf_x86_bpfel.go
- tls_attach_linux.go
- tls_discovery_events.go
- tls_discovery_linux.go
- tls_overlay_linux.go
Click to show internal directories.
Click to hide internal directories.