Documentation
¶
Overview ¶
Package report defines the two agent-written report contracts — the investigation report and the remediation report — as YAML frontmatter schemas with strict, validated parsing. The prompts promise these exact shapes; unknown keys, missing required fields, and out-of-range values are errors, because everything downstream (routing, priority, budgets) is derived from these files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StripFrontmatter ¶ added in v0.5.4
StripFrontmatter returns the markdown body following a leading ---fenced YAML block, or s unchanged when there is no complete fence. The runner stores body-only reports; this covers report text persisted before it did.
Types ¶
type Analysis ¶ added in v0.4.0
Analysis is one investigation dimension: the rating plus a short justification (the full reasoning lives in the report body).
type Investigation ¶ added in v0.4.0
type Investigation struct {
// Exploitability: can the vulnerability actually be exercised here?
Exploitability Analysis `yaml:"exploitability"`
// Likelihood: how probable is exploitation in this deployment?
Likelihood Analysis `yaml:"likelihood"`
// Impact: what is the blast radius if exploited?
Impact Analysis `yaml:"impact"`
Recommendation Recommendation `yaml:"recommendation"`
Priority Level `yaml:"priority"`
Severity Level `yaml:"severity"`
// Confidence is the likelihood the recommendation is right — for
// remediate, the likelihood of full remediation without breaking
// functionality. Pointer so absence is detectable.
Confidence *float64 `yaml:"confidence"`
// BreakingChangeAvailable marks that a better fix exists but would
// break external callers; the pipeline then holds for approval.
BreakingChangeAvailable bool `yaml:"breaking_change_available"`
// Model, MaxTurns and TokenBudget are required iff Recommendation is
// remediate; the controller clamps them against its ceilings/allowlist.
Model string `yaml:"model"`
MaxTurns int `yaml:"max_turns"`
TokenBudget int `yaml:"token_budget"`
// Body is the markdown analysis following the frontmatter.
Body string `yaml:"-"`
}
Investigation is the parsed investigation report — the analysis stage's contract, carrying the three assessed dimensions the scheduler's priority derives from.
func ParseInvestigation ¶ added in v0.4.0
func ParseInvestigation(data []byte) (*Investigation, error)
ParseInvestigation parses and validates an investigation report.
type Rating ¶ added in v0.4.0
type Rating string
Rating grades one investigation dimension. "none" is an assessed "not applicable / no realistic risk" — distinct from an absent rating, which fails validation.
type Recommendation ¶
type Recommendation string
Recommendation is the investigation's verdict. The values are the same vocabulary internal/labels stamps on the tracking issue (security-recommendation: <value>) — one vocabulary, no mapping.
const ( RecommendIgnore Recommendation = "ignore" RecommendRemediate Recommendation = "remediate" RecommendManual Recommendation = "manual" )
The investigation verdicts.
type Remediation ¶
type Remediation struct {
// Success reports whether the agent believes the finding is fully
// remediated. Pointer so absence is detectable; the runner verifies the
// repository state regardless and may downgrade a claimed success.
Success *bool `yaml:"success"`
// Confidence is how confident the agent is that the issue is
// remediated without breaking functionality.
Confidence *float64 `yaml:"confidence"`
// Body is the markdown summary following the frontmatter.
Body string `yaml:"-"`
}
Remediation is the parsed remediation report.
func ParseRemediation ¶
func ParseRemediation(data []byte) (*Remediation, error)
ParseRemediation parses and validates a remediation report.