report

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func StripFrontmatter(s string) string

StripFrontmatter returns the markdown body following a leading ---fenced YAML block, or s unchanged when there is no complete fence. Stored reports keep their frontmatter (it is the machine contract the remediation stage re-parses); presentation seams — the status page, PR bodies, issue comments — call this before rendering.

Types

type Analysis added in v0.4.0

type Analysis struct {
	Rating  Rating `yaml:"rating"`
	Summary string `yaml:"summary"`
}

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 model is clamped to the allowlist; the turn and token
	// figures are an ESTIMATE and never limit the run they describe.
	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 Level

type Level string

Level is a priority or severity value.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL