Documentation
¶
Overview ¶
Package posture scores a snapshot against security and operational checks for the agentic stack (agentgateway, kagent, agentregistry, MCP) and Istio ambient, and says what to change. The checks follow defence-in-depth guidance: authenticate every MCP and LLM route, authorise per tool, rate-limit and guard AI traffic, keep workloads in the mesh with STRICT mTLS and default-deny, and make L7 policy actually run.
Every check works from captured objects only. Where the customer excluded the data a check needs, or nothing it applies to exists, the check is marked not applicable with the reason, and never counted as a failure.
Index ¶
Constants ¶
const DeclaredWhy = "declared state only (repo scan)"
DeclaredWhy is the reason a check is not applicable on a repo scan: the bundle holds what the repository declares, with no status and no pods.
Variables ¶
This section is empty.
Functions ¶
func Impact ¶
Impact is how much a problem matters regardless of which area it is in: severity weight times the share of credit missing. Ranking by area points alone would bury a critical check in a large area (agentic has many checks, so each is worth fewer of its points) under a high check in a small one.
func PointsIfFixed ¶
PointsIfFixed is the number of area score points a check would recover if every object it looked at passed: its severity weight times the credit it is missing, as a share of the area's total weight.
Types ¶
type AreaScore ¶
type AreaScore struct {
Area string `json:"area"`
Title string `json:"title"`
Present bool `json:"present"`
Reason string `json:"reason,omitempty"`
Score int `json:"score"`
Grade string `json:"grade"`
Categories map[string]int `json:"categories"`
Counts map[Status]int `json:"counts"`
}
AreaScore summarises one area.
type Check ¶
type Check struct {
ID string `json:"id"`
Area string `json:"area"` // agentic or ambient
Category string `json:"category"`
Severity string `json:"severity"`
Title string `json:"title"`
Why string `json:"why"`
Fix string `json:"fix"`
Source string `json:"source"` // a related public field guide
Docs string `json:"docs,omitempty"` // a related product documentation page
Status Status `json:"status"`
Reason string `json:"reason,omitempty"`
Items []Item `json:"items"`
Passed int `json:"passed"`
Total int `json:"total"`
Score float64 `json:"score"` // 0..1
Points float64 `json:"points,omitempty"` // area points recovered if fixed (Enterprise)
}
Check is one best practice and its result.
type Item ¶
type Item struct {
Cluster string `json:"cluster"`
Group string `json:"group"`
Resource string `json:"resource"`
Kind string `json:"kind"`
Namespace string `json:"namespace"`
Name string `json:"name"`
Status Status `json:"status"`
Detail string `json:"detail"`
}
Item is one object a check looked at.
type Priority ¶
type Priority struct {
Rank int `json:"rank"`
ID string `json:"id"`
Area string `json:"area"`
Title string `json:"title"`
Severity string `json:"severity"`
Status Status `json:"status"`
Points float64 `json:"points"` // area score points recovered if every object passed
Impact float64 `json:"impact"` // severity weight x share missing, the ranking key
Failing int `json:"failing"`
Warning int `json:"warning"`
Total int `json:"total"`
Objects []string `json:"objects"` // the first few objects to change
Fix string `json:"fix"`
Source string `json:"source"`
Docs string `json:"docs,omitempty"`
}
Priority is one problem to fix, ranked by the score it would give back.
func Priorities ¶
Priorities ranks the failing and warning checks by impact, then severity, then points recovered, then objects affected. n <= 0 returns all.
type Report ¶
type Report struct {
Areas []AreaScore `json:"areas"`
Checks []Check `json:"checks"`
Priorities []Priority `json:"priorities,omitempty"` // Enterprise: fix-first ranking
}
Report is the full result.
func (Report) WithPriorities ¶
WithPriorities fills in points recovered per check and the fix-first ranking (the Flightbay Enterprise priority view). top <= 0 keeps them all.