Documentation
¶
Index ¶
- func CertificateStatus(cert *certificate.CertMonitor) string
- func ContainerStatus(c *container.Container) string
- func EndpointStatus(ep *endpoint.Endpoint) string
- func HeartbeatStatus(hb *heartbeat.Heartbeat) string
- func IsStreamingPath(path string) bool
- func MapSecuritySeverity(s string) string
- func SPAHandler(apiHandler http.Handler, logger *slog.Logger) http.Handler
- func ScanContainerSecurity(ctx context.Context, dr *docker.Runtime, containerSvc *container.Service, ...)
- func WithRequestTimeout(h http.Handler, timeout time.Duration) http.Handler
- func WorstStatus(a, b string) string
- type App
- type CVEPostureAdapter
- type CertPostureAdapter
- type Config
- type MCPConfig
- type SMTPConfig
- type UpdatePostureAdapter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertificateStatus ¶
func CertificateStatus(cert *certificate.CertMonitor) string
CertificateStatus derives the status page status for a certificate monitor.
func ContainerStatus ¶
ContainerStatus derives the status page status for a container.
func EndpointStatus ¶
EndpointStatus derives the status page status for an endpoint.
func HeartbeatStatus ¶
HeartbeatStatus derives the status page status for a heartbeat.
func IsStreamingPath ¶
IsStreamingPath reports whether path corresponds to an SSE or streaming endpoint.
func MapSecuritySeverity ¶
MapSecuritySeverity maps security insight severity to alert severity.
func SPAHandler ¶
SPAHandler returns an http.Handler that serves the embedded SPA frontend. API and ping routes are delegated to the API handler; everything else is served from the embedded filesystem, with a fallback to index.html for client-side routing.
func ScanContainerSecurity ¶
func ScanContainerSecurity(ctx context.Context, dr *docker.Runtime, containerSvc *container.Service, secSvc *security.Service, externalID string, logger *slog.Logger)
ScanContainerSecurity inspects a single container and updates its security insights.
func WithRequestTimeout ¶
WithRequestTimeout wraps non-streaming handlers with http.TimeoutHandler so that ordinary REST requests are bounded even though the server-level WriteTimeout is disabled (required for SSE).
func WorstStatus ¶
WorstStatus returns the most severe status between two values.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App holds all application services and manages their lifecycle.
func (*App) RunMCPStdio ¶
RunMCPStdio runs the MCP server over stdin/stdout, then returns.
type CVEPostureAdapter ¶
type CVEPostureAdapter struct {
Store update.UpdateStore
}
CVEPostureAdapter adapts the update store for CVE scoring.
func (*CVEPostureAdapter) ListCVEsForContainer ¶
type CertPostureAdapter ¶
type CertPostureAdapter struct {
CertSvc *certificate.Service
}
CertPostureAdapter adapts the certificate service for posture scoring.
func (*CertPostureAdapter) ListCertificatesForContainer ¶
func (a *CertPostureAdapter) ListCertificatesForContainer(ctx context.Context, containerExternalID string) ([]security.CertificateInfo, error)
type Config ¶
type Config struct {
// Server
Addr string
BaseURL string
// Database
DBPath string
// License
LicenseKey string
// SMTP
SMTP SMTPConfig
// MCP
MCP MCPConfig
// HTTP
CORSOrigins string
MaxBodySize int64
// Branding
OrgName string
// Kubernetes
K8sNamespaces string
K8sExcludeNS string
// Security
SecurityScoreThreshold int
// Telemetry
DisableTelemetry bool
// Dev
AllowPrivateWebhooks bool
// Build info (injected via ldflags)
Version string
Commit string
BuildDate string
PublicKeyB64 string
}
Config holds all application configuration parsed from environment variables.
func ConfigFromEnv ¶
func ConfigFromEnv() Config
ConfigFromEnv reads configuration from environment variables.
type MCPConfig ¶
type MCPConfig struct {
Enabled bool
ClientID string
ClientSecret string
AllowedRedirectURIs string
}
MCPConfig holds Model Context Protocol server configuration.
type SMTPConfig ¶
SMTPConfig holds SMTP mail server configuration.
type UpdatePostureAdapter ¶
type UpdatePostureAdapter struct {
Store update.UpdateStore
}
UpdatePostureAdapter adapts the update store for update/image-age scoring.
func (*UpdatePostureAdapter) ListUpdatesForContainer ¶
func (a *UpdatePostureAdapter) ListUpdatesForContainer(ctx context.Context, containerExternalID string) ([]security.UpdateInfo, error)