Documentation
¶
Overview ¶
Package contextctrl is the context-controller's engine: it reacts to newly opened security-finding issues, runs the enhancer chain (CMDB ownership, infrastructure context — pkg/enhance plugins), posts each contribution as an attributed comment carrying a machine-readable enrichment block, and advances the issue to context-enhanced.
Enhancement is best-effort by design: a failing enhancer is logged and skipped, and the transition happens regardless — enrichment must never block the pipeline.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clients ¶
type Clients interface {
For(ctx context.Context, repo ghclient.Repo) (Stores, error)
All(ctx context.Context) ([]Searcher, error)
}
Clients resolves GitHub access per repository and across installations.
type Config ¶
type Config struct {
// Grace is how old an opened issue must be before the reconcile pass
// enhances it — breathing room for the webhook fast path so the two
// don't race on fresh issues. Default two minutes.
Grace time.Duration
}
Config tunes the controller.
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller is the context-controller engine; it implements webhook.Handler.
type Searcher ¶
type Searcher interface {
SearchIssues(ctx context.Context, query string) ([]*ghclient.Issue, error)
}
Searcher runs cross-repository issue searches within one installation.
type Stores ¶
type Stores interface {
ghclient.IssueStore
}
Stores is the per-repository GitHub surface the controller mutates.