Documentation
¶
Overview ¶
Package integrations connects Scout to its sibling tools, Pulse (observability) and Sentinel (runtime defense). Both are optional and auto-detected: Scout is fully useful with neither present. These clients talk to operator-configured sibling services, never to scan targets, so they do not go through the scan guard.
Index ¶
Constants ¶
const ( DefaultPulseTestRuns = "/pulse/api/test-runs" DefaultSentinelScore = "/sentinel/api/security-score" )
Paths on the sibling services. The Pulse path is from Scout's project description; both are overridable in config to match a deployment.
Variables ¶
This section is empty.
Functions ¶
func CombinedScore ¶
CombinedScore merges Scout's exposure score (how exposed the app is, from a scan, 0-100 where higher is safer) with Sentinel's runtime defense score (how well it defends at runtime, 0-100). The result is the geometric mean, so a weakness on either side pulls the combined number down and neither side can mask the other. A runtime score <= 0 means "unknown": the exposure score is returned unchanged.
Types ¶
type Dispatcher ¶
type Dispatcher struct {
Pulse *Pulse
Sentinel *Sentinel
Store storage.Store
Logger *slog.Logger
Timeout time.Duration
}
Dispatcher registers finished scans with any detected siblings.
func (*Dispatcher) Active ¶
func (d *Dispatcher) Active() bool
Active reports whether any sibling is configured.
type Pulse ¶
type Pulse struct {
BaseURL string
Path string
Token string
HTTP doer
// contains filtered or unexported fields
}
Pulse registers scans with Pulse so they appear as bands on its charts.
type ScanRef ¶
type ScanRef struct {
ID string `json:"id"`
Target string `json:"target"`
TargetURL string `json:"target_url,omitempty"`
Env core.Environment `json:"environment"`
Mode string `json:"mode"`
Grade string `json:"grade"`
Score float64 `json:"score"`
Findings int `json:"findings"`
StartedAt string `json:"started_at"`
FinishedAt string `json:"finished_at"`
}
ScanRef is the minimal, non-sensitive description of a scan shared with a sibling. It never carries findings' evidence.
type Sentinel ¶
type Sentinel struct {
BaseURL string
Path string
Token string
HTTP doer
// contains filtered or unexported fields
}
Sentinel receives Scout's exposure score to combine with its runtime defense score.
func NewSentinel ¶
NewSentinel returns a Sentinel client.