v1alpha1

package
v0.11.7 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 7 Imported by: 1 module, 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 v1alpha1 defines the patchy.bitwisemedia.uk/v1alpha1 API: the custom resources that carry finding state through the pipeline.

The kinds fall into three groups:

  • Edge configuration: Integration (an external system — scanner ingestion and/or tracking projection, e.g. a GitHub App handling code-scanning alerts in and issue tracking out) and Forge (repository credentials for cloning, pushing, and pull requests, selected by host/org/repo filters).
  • The pipeline: Finding is the authoritative state machine (phases and legal transitions live in transitions.go); Investigation and Remediation are one-per-attempt immutable children recording each agent run; Repository is the SHA-pinned clone artifact source-controller serves to agent jobs as a tarball.
  • Statistics: FindingRollup objects — one per scope value (total, repository, harness, model) — accumulate all-time counters that survive the TTL deletion of completed Findings.
  • Remote evaluations: Evaluation is one submission of coding-agent skill evaluations from an external client (evolve); EvaluationUnit is its one-per-unit immutable child recording each sandboxed run. Both expire on a TTL; their phases are local enums, not part of the Finding state machine.

Structural-schema rules shape the types: no floats (confidence and cost are validated decimal strings; rollup sums are int64 micro-USD; durations are int64 milliseconds), bounded sizes everywhere (etcd caps objects at about 1.5MiB), and agent changesets never appear in any resource.

Index

Constants

View Source
const (
	// LabelKeyHash carries the hex-encoded accumulation-key hash on a Finding.
	LabelKeyHash = "patchy.bitwisemedia.uk/key-hash"
	// LabelSource carries the source handler ID (e.g. github-code-scanning).
	LabelSource = "patchy.bitwisemedia.uk/source"
	// LabelIntegration names the Integration that ingested a Finding.
	LabelIntegration = "patchy.bitwisemedia.uk/integration"
	// LabelRepoHash carries the hex-encoded repository-URL hash.
	LabelRepoHash = "patchy.bitwisemedia.uk/repo-hash"
	// LabelSeverity mirrors spec.severity for selectors.
	LabelSeverity = "patchy.bitwisemedia.uk/severity"
	// LabelFinding names the owning Finding on children and agent Jobs.
	LabelFinding = "patchy.bitwisemedia.uk/finding"
	// LabelAttempt carries the attempt ordinal on Investigation/Remediation.
	LabelAttempt = "patchy.bitwisemedia.uk/attempt"
	// LabelOwner names the owning Investigation or Remediation on agent Jobs.
	LabelOwner = "patchy.bitwisemedia.uk/owner"
	// LabelRunKind discriminates agent Jobs ("investigation"/"remediation") so
	// the two job controllers sharing one namespace never touch each other's
	// Jobs.
	LabelRunKind = "patchy.bitwisemedia.uk/kind"
	// LabelHarness names the agent harness a Job's pod runs ("claude"/"codex"),
	// the selector the per-harness egress network policies match on so each
	// runner reaches only its own model API.
	LabelHarness = "patchy.bitwisemedia.uk/harness"
	// LabelScope carries the rollup scope type on FindingRollup objects.
	LabelScope = "patchy.bitwisemedia.uk/scope"
	// LabelEvaluation names the owning Evaluation on EvaluationUnit children
	// and evaluation agent Jobs.
	LabelEvaluation = "patchy.bitwisemedia.uk/evaluation"
	// LabelUnitIndex carries the unit's 0-based index within its Evaluation.
	LabelUnitIndex = "patchy.bitwisemedia.uk/unit-index"

	// AnnotationRepo carries the true "owner/name" on Investigation and
	// Remediation children (label values cannot hold it), so the rollup can
	// attribute spend to the repository even after the Finding is gone.
	AnnotationRepo = "patchy.bitwisemedia.uk/repo"
)

Label, annotation, and finalizer keys shared by every controller. The truth behind hashed label values (repository URLs, accumulation keys) always lives in the owning object's spec — labels exist only for selectors.

View Source
const (
	FinalizerJobs             = "patchy.bitwisemedia.uk/jobs"
	FinalizerRollupTotal      = "patchy.bitwisemedia.uk/rollup-total"
	FinalizerRollupRepository = "patchy.bitwisemedia.uk/rollup-repository"
	FinalizerRollupHarness    = "patchy.bitwisemedia.uk/rollup-harness"
	FinalizerRollupModel      = "patchy.bitwisemedia.uk/rollup-model"
)

Finalizers. The rollup finalizers guarantee no object is deleted before its spend is aggregated into every scope (see FindingRollup); the jobs finalizer guarantees leftover Jobs/Secrets in the agents namespace are cleaned up.

View Source
const (
	// ConditionReady is the summary condition on every kind.
	ConditionReady = "Ready"
	// ConditionStalled marks an object that cannot progress without operator
	// action (ambiguous forge match, oversized artifact, ambiguous tracking).
	ConditionStalled = "Stalled"
	// ConditionAccumulationComplete marks a Finding whose 1-hour accumulation
	// window has closed (accumulation is a condition, not a phase — alerts
	// fold in concurrently with enhancement).
	ConditionAccumulationComplete = "AccumulationComplete"
	// ConditionContextEnhanced marks a Finding whose enhancer chain ran.
	ConditionContextEnhanced = "ContextEnhanced"
	// ConditionInvestigated marks a Finding with a completed investigation;
	// the reason carries the recommendation.
	ConditionInvestigated = "Investigated"
	// ConditionApproved marks a Finding whose spec.approval was accepted.
	ConditionApproved = "Approved"
	// ConditionRetried marks a Finding whose spec.retry was consumed — a
	// human recovered it from Failed; the message carries the requester.
	ConditionRetried = "Retried"
	// ConditionForgeResolved reports whether the Finding's repository resolved
	// to exactly one Forge (False reasons: NoRepository, NoForgeMatch,
	// Ambiguous). Parked findings are re-queued when Forges change.
	ConditionForgeResolved = "ForgeResolved"
	// ConditionComplete marks a finished Investigation/Remediation (reason:
	// the stage outcome), a settled EvaluationUnit (reason: Complete or the
	// unit failure reason), or a settled Evaluation (reason: Complete/Failed).
	ConditionComplete = "Complete"
	// ConditionUnitsCreated marks an Evaluation whose child EvaluationUnits
	// all exist.
	ConditionUnitsCreated = "UnitsCreated"

	// Per-scope rollup markers. A scope's finalizer is removed only when its
	// condition is True and deletion is underway — remaining finalizers show
	// exactly which scopes still owe aggregation.
	ConditionRolledUpTotal      = "RolledUpTotal"
	ConditionRolledUpRepository = "RolledUpRepository"
	ConditionRolledUpHarness    = "RolledUpHarness"
	ConditionRolledUpModel      = "RolledUpModel"
)

Condition types. Every kind carries Ready; the rest are noted per kind.

View Source
const (
	// ReasonNoRepository: the finding has no repository (e.g. a cloud
	// finding) — nothing to resolve a Forge against.
	ReasonNoRepository = "NoRepository"
	// ReasonNoForgeMatch: no Forge's filters matched the repository.
	ReasonNoForgeMatch = "NoForgeMatch"
	// ReasonAmbiguous: more than one Forge matched with equal specificity —
	// an operator configuration error.
	ReasonAmbiguous = "Ambiguous"
	// ReasonRepositoryUnresolved: a cloud finding's repository lookup failed
	// in a way worth retrying, so the enhancer chain is holding the finding
	// at Opened rather than advancing it without a repository. Bounded by the
	// accumulation window; past that the finding advances regardless.
	ReasonRepositoryUnresolved = "RepositoryUnresolved"
)

Condition reasons.

View Source
const ConfidencePattern = `^(0(\.[0-9]{1,4})?|1(\.0{1,4})?)$`

ConfidencePattern validates a confidence decimal string in [0, 1] with up to four fractional digits.

View Source
const RollupSchemaVersion int32 = 2

RollupSchemaVersion is the current bucket layout.

1 — the original counters.
2 — StageAggregate.Turns and StageAggregate.Estimate.

Every bump so far has been additive, so a bucket written at an older version stays valid and is upgraded in place; the fields added by the bump simply carry no history. EstimateAggregate.Runs is the denominator that keeps that honest — it counts only the runs that actually contributed.

Variables

View Source
var (
	// GroupVersion is the group and version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "patchy.bitwisemedia.uk", Version: "v1alpha1"}

	// SchemeBuilder collects the functions that register this group-version's
	// types into a scheme.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

The api package deliberately depends only on apimachinery (no controller-runtime): it is imported by the e2e module and, eventually, the UI.

Functions

func CanTransition

func CanTransition(from, to Phase) bool

CanTransition reports whether moving a Finding from phase `from` to `to` is legal. The empty phase means a new Finding. Self-transitions are always legal no-ops.

func RetryRequested added in v0.5.2

func RetryRequested(f *Finding) bool

RetryRequested reports whether spec.retry is actionable: present and newer than the failure's completion. A retry consumed by a transition (which clears completedAt) can never re-fire — a later failure stamps a fresh completedAt that outdates it.

func SetPhase

func SetPhase(f *Finding, to Phase, now time.Time) error

SetPhase moves the Finding to phase `to` at time `now`: it validates the transition, appends to status.phaseTimes, and maintains status.completedAt (set on terminal entry, cleared on revival — the TTL contract is completedAt + TTL). Callers running under conflict retry must call SetPhase again after every re-Get so the transition is re-validated against fresh state; an illegal transition returns an error and mutates nothing.

func Terminal

func Terminal(p Phase) bool

Terminal reports whether the phase completes a Finding (starts its TTL). Dismissed, HandedOff, and Failed are terminal but revivable.

Types

type AWSConfigAggregator added in v0.9.0

type AWSConfigAggregator struct {
	// Name of the configuration aggregator.
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`
	// Region the aggregator lives in.
	// +kubebuilder:validation:MinLength=1
	Region string `json:"region"`
}

AWSConfigAggregator names the AWS Config configuration aggregator the resource-tags enhancer queries. An organization aggregator answers for the whole estate from one place; the trade is that AWS Config recording must be enabled in every member account and region the findings cover.

func (*AWSConfigAggregator) DeepCopy added in v0.9.0

func (in *AWSConfigAggregator) DeepCopy() *AWSConfigAggregator

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSConfigAggregator.

func (*AWSConfigAggregator) DeepCopyInto added in v0.9.0

func (in *AWSConfigAggregator) DeepCopyInto(out *AWSConfigAggregator)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AWSIntegration added in v0.9.0

type AWSIntegration struct {
	// ResourceTags enables the tag-inventory enhancer.
	// +optional
	ResourceTags *AWSResourceTags `json:"resourceTags,omitempty"`
}

AWSIntegration is the aws provider block. It carries no credential Secret: the resource-tags enhancer authenticates by the SDK default credential chain, so no key material lives in the cluster.

func (*AWSIntegration) DeepCopy added in v0.9.0

func (in *AWSIntegration) DeepCopy() *AWSIntegration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSIntegration.

func (*AWSIntegration) DeepCopyInto added in v0.9.0

func (in *AWSIntegration) DeepCopyInto(out *AWSIntegration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AWSResourceExplorer added in v0.9.0

type AWSResourceExplorer struct {
	// ViewARN is the Resource Explorer view, e.g.
	// arn:aws:resource-explorer-2:eu-west-2:123456789012:view/org-view/<uuid>.
	// The region the view lives in is read from the ARN.
	// +kubebuilder:validation:Pattern=`^arn:[a-z-]+:resource-explorer-2:[a-z0-9-]+:[0-9]{12}:view/.+$`
	ViewARN string `json:"viewARN"`
}

AWSResourceExplorer names the AWS Resource Explorer view the resource-tags enhancer searches. An organization-wide view answers for the whole estate without per-account credentials; the view must include the tags property, or every lookup would silently come back tagless — the enhancer refuses such a view at configuration time.

func (*AWSResourceExplorer) DeepCopy added in v0.9.0

func (in *AWSResourceExplorer) DeepCopy() *AWSResourceExplorer

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSResourceExplorer.

func (*AWSResourceExplorer) DeepCopyInto added in v0.9.0

func (in *AWSResourceExplorer) DeepCopyInto(out *AWSResourceExplorer)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AWSResourceTags added in v0.9.0

type AWSResourceTags struct {
	// Enabled turns the enhancer capability on.
	Enabled bool `json:"enabled"`
	// ConfigAggregator queries an AWS Config aggregator (SQL over recorded
	// configuration items).
	// +optional
	ConfigAggregator *AWSConfigAggregator `json:"configAggregator,omitempty"`
	// ResourceExplorer searches an AWS Resource Explorer view.
	// +optional
	ResourceExplorer *AWSResourceExplorer `json:"resourceExplorer,omitempty"`
	// RepositoryHost is the forge host repositories named by tags live on;
	// empty means github.com.
	// +optional
	RepositoryHost string `json:"repositoryHost,omitempty"`
	// Tags overrides the resource tag names the enhancer reads.
	// +optional
	Tags *AssetLabelKeys `json:"tags,omitempty"`
}

AWSResourceTags enables the context enhancer that resolves the repository (and attributes) of any finding whose cloud resource lives on AWS — whichever source ingested it — by reading the resource's tags from an organization-level inventory. Exactly one inventory backend must be named. Read-only: the context-controller authenticates by the SDK default credential chain (EKS Pod Identity or IRSA on EKS, web-identity federation elsewhere) and holds no Secret. +kubebuilder:validation:XValidation:rule="has(self.configAggregator) != has(self.resourceExplorer)",message="exactly one of configAggregator or resourceExplorer must be set"

func (*AWSResourceTags) DeepCopy added in v0.9.0

func (in *AWSResourceTags) DeepCopy() *AWSResourceTags

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSResourceTags.

func (*AWSResourceTags) DeepCopyInto added in v0.9.0

func (in *AWSResourceTags) DeepCopyInto(out *AWSResourceTags)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ActionRequest added in v0.5.2

type ActionRequest struct {
	// By is the requesting login.
	By string `json:"by"`
	// At is when the request was received.
	At metav1.Time `json:"at"`
}

ActionRequest records who requested a human action (retry, expedite) and when. Freshness against status timestamps decides whether the request is still actionable — the consuming controller never clears spec.

func (*ActionRequest) DeepCopy added in v0.5.2

func (in *ActionRequest) DeepCopy() *ActionRequest

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionRequest.

func (*ActionRequest) DeepCopyInto added in v0.5.2

func (in *ActionRequest) DeepCopyInto(out *ActionRequest)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ActiveRun

type ActiveRun struct {
	// Kind of the active run.
	Kind RunKind `json:"kind"`
	// Name of the active child.
	Name string `json:"name"`
}

ActiveRun points at the child currently holding the run lease (the lease itself is the deterministic child-CR create).

func (*ActiveRun) DeepCopy

func (in *ActiveRun) DeepCopy() *ActiveRun

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActiveRun.

func (*ActiveRun) DeepCopyInto

func (in *ActiveRun) DeepCopyInto(out *ActiveRun)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AgentEstimate added in v0.8.0

type AgentEstimate struct {
	// MaxTurns the investigation predicts the remediation will take.
	// +optional
	// +kubebuilder:validation:Minimum=0
	MaxTurns int32 `json:"maxTurns,omitempty"`
	// TokenBudget is the predicted output-token spend.
	// +optional
	// +kubebuilder:validation:Minimum=0
	TokenBudget int64 `json:"tokenBudget,omitempty"`
}

AgentEstimate is the investigation's prediction of what a remediation will need. It is advisory: it never reduces a run's budget. Its only operational effect is the approval gate — an estimate above what patchy will spend unattended holds the finding in AwaitingApproval, and approving it grants the estimate (bounded by the manual budget). Everything else it does is reporting: estimate against granted against actual, and the skew averages in the rollups.

func (*AgentEstimate) DeepCopy added in v0.8.0

func (in *AgentEstimate) DeepCopy() *AgentEstimate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentEstimate.

func (*AgentEstimate) DeepCopyInto added in v0.8.0

func (in *AgentEstimate) DeepCopyInto(out *AgentEstimate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AgentParameters

type AgentParameters struct {
	// Model the harness runs, as a canonical provider-qualified id
	// (e.g. "anthropic/claude-sonnet-5").
	// +optional
	Model string `json:"model,omitempty"`
	// Harness that runs Model, resolved from the model by the remediation
	// spawner (the model's provider decides which agent-runner image and
	// credential the Job uses). Empty until resolution.
	// +optional
	Harness string `json:"harness,omitempty"`
	// MaxTurns granted to the run.
	// +optional
	// +kubebuilder:validation:Minimum=0
	MaxTurns int32 `json:"maxTurns,omitempty"`
	// TokenBudget granted to the run (output tokens; the runner kill switch).
	// +optional
	// +kubebuilder:validation:Minimum=0
	TokenBudget int64 `json:"tokenBudget,omitempty"`
	// Estimate the investigation made for this run, recorded alongside the
	// grant so the two can be compared after the fact.
	// +optional
	Estimate *AgentEstimate `json:"estimate,omitempty"`
}

AgentParameters bound one agent run: which model it uses and how much it may spend. MaxTurns/TokenBudget are what the run was actually GRANTED — the automated budget, or the investigation's estimate (bounded by the manual budget) when a human approved it. They are never derived downward from the estimate: a run always gets at least the automated budget, whatever the investigation predicted, including when it predicted nothing.

func (*AgentParameters) DeepCopy

func (in *AgentParameters) DeepCopy() *AgentParameters

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentParameters.

func (*AgentParameters) DeepCopyInto

func (in *AgentParameters) DeepCopyInto(out *AgentParameters)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Alert

type Alert struct {
	// ID of the alert in the source system.
	// +kubebuilder:validation:MinLength=1
	ID string `json:"id"`
	// Source is the source handler that produced this alert, denormalized
	// from the finding at ingest. Accumulation keys on source, so today every
	// alert on a finding shares spec.source and this is redundant — but
	// duplicate-of merges are defined to fold one finding into another, and
	// the verdict write-back must hand each source only its own alerts.
	// Recording provenance beats inferring it from the shape of an id.
	// Empty on alerts written before this field existed; readers fall back to
	// spec.source.
	// +optional
	Source string `json:"source,omitempty"`
	// URL of the alert in the source system.
	// +optional
	URL string `json:"url,omitempty"`
	// Locations the alert points at.
	// +optional
	// +kubebuilder:validation:MaxItems=8
	Locations []Location `json:"locations,omitempty"`
}

Alert is one scanner alert folded into the finding during accumulation. IDs are strings — GHAS alert numbers render as decimal, other scanners use opaque identifiers.

func (*Alert) DeepCopy

func (in *Alert) DeepCopy() *Alert

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Alert.

func (*Alert) DeepCopyInto

func (in *Alert) DeepCopyInto(out *Alert)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Analysis

type Analysis struct {
	// Rating of the dimension.
	Rating Rating `json:"rating"`
	// Summary is the agent's short justification.
	// +optional
	// +kubebuilder:validation:MaxLength=4096
	Summary string `json:"summary,omitempty"`
}

Analysis is one investigation dimension: a rating plus a short justification. The full reasoning lives in the report markdown.

func (*Analysis) DeepCopy

func (in *Analysis) DeepCopy() *Analysis

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Analysis.

func (*Analysis) DeepCopyInto

func (in *Analysis) DeepCopyInto(out *Analysis)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Approval

type Approval struct {
	// By is the approving login.
	By string `json:"by"`
	// At is when the approval was received.
	At metav1.Time `json:"at"`
	// Note is optional free text following the approve command.
	// +optional
	// +kubebuilder:validation:MaxLength=1024
	Note string `json:"note,omitempty"`
}

Approval records a human /approve on the tracking item.

func (*Approval) DeepCopy

func (in *Approval) DeepCopy() *Approval

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Approval.

func (*Approval) DeepCopyInto

func (in *Approval) DeepCopyInto(out *Approval)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Artifact

type Artifact struct {
	// URL the artifact is served at (cluster-internal; the path embeds an
	// unguessable random id).
	URL string `json:"url"`
	// Digest is the sha256 of the tarball, verified by the fetching init
	// container.
	Digest string `json:"digest"`
	// SizeBytes of the tarball.
	// +optional
	SizeBytes int64 `json:"sizeBytes,omitempty"`
	// LastFetchedAt is when the clone was produced.
	// +optional
	LastFetchedAt *metav1.Time `json:"lastFetchedAt,omitempty"`
}

Artifact is the served clone tarball. The tarball contains the working tree plus its shallow .git directory (agents need git for committing and changeset packaging).

func (*Artifact) DeepCopy

func (in *Artifact) DeepCopy() *Artifact

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Artifact.

func (*Artifact) DeepCopyInto

func (in *Artifact) DeepCopyInto(out *Artifact)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AssetLabelKeys added in v0.9.0

type AssetLabelKeys struct {
	// Org label carries the repository owner/organization.
	// +optional
	Org string `json:"org,omitempty"`
	// Name label carries the repository name.
	// +optional
	Name string `json:"name,omitempty"`
	// Provider label carries the forge kind (e.g. github).
	// +optional
	Provider string `json:"provider,omitempty"`
	// URL label carries a full repository URL, overriding the parts.
	// +optional
	URL string `json:"url,omitempty"`
}

AssetLabelKeys overrides the resource label (or tag) names a cloud enhancer reads a repository identity from. Empty fields keep the defaults (scm-repository-org, scm-repository-name, scm-repository-provider, scm-repository-url).

func (*AssetLabelKeys) DeepCopy added in v0.9.0

func (in *AssetLabelKeys) DeepCopy() *AssetLabelKeys

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AssetLabelKeys.

func (*AssetLabelKeys) DeepCopyInto added in v0.9.0

func (in *AssetLabelKeys) DeepCopyInto(out *AssetLabelKeys)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AttemptCounts

type AttemptCounts struct {
	// Investigation attempts so far.
	// +optional
	Investigation int32 `json:"investigation,omitempty"`
	// Remediation attempts so far.
	// +optional
	Remediation int32 `json:"remediation,omitempty"`
}

AttemptCounts tallies agent runs per stage.

func (*AttemptCounts) DeepCopy

func (in *AttemptCounts) DeepCopy() *AttemptCounts

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AttemptCounts.

func (*AttemptCounts) DeepCopyInto

func (in *AttemptCounts) DeepCopyInto(out *AttemptCounts)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AzureIntegration added in v0.9.0

type AzureIntegration struct {
	// ResourceTags enables the tag-inventory enhancer.
	// +optional
	ResourceTags *AzureResourceTags `json:"resourceTags,omitempty"`
}

AzureIntegration is the azure provider block. It carries no credential Secret: the resource-tags enhancer authenticates by the Azure default credential chain, so no key material lives in the cluster.

func (*AzureIntegration) DeepCopy added in v0.9.0

func (in *AzureIntegration) DeepCopy() *AzureIntegration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureIntegration.

func (*AzureIntegration) DeepCopyInto added in v0.9.0

func (in *AzureIntegration) DeepCopyInto(out *AzureIntegration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AzureResourceTags added in v0.9.0

type AzureResourceTags struct {
	// Enabled turns the enhancer capability on.
	Enabled bool `json:"enabled"`
	// ManagementGroup narrows the query scope to one management group; empty
	// means every subscription the ambient identity can read (the tenant, in
	// practice).
	// +optional
	ManagementGroup string `json:"managementGroup,omitempty"`
	// RepositoryHost is the forge host repositories named by tags live on;
	// empty means github.com.
	// +optional
	RepositoryHost string `json:"repositoryHost,omitempty"`
	// Tags overrides the resource tag names the enhancer reads.
	// +optional
	Tags *AssetLabelKeys `json:"tags,omitempty"`
}

AzureResourceTags enables the context enhancer that resolves the repository (and attributes) of any finding whose cloud resource lives on Azure — whichever source ingested it — by reading the resource's tags from Azure Resource Graph. Resource Graph is tenant-wide and always on, so there is no backend choice to make: one KQL lookup by ARM resource ID answers for every subscription the ambient identity can read. Read-only: the context-controller authenticates by the Azure default credential chain (Microsoft Entra Workload ID on AKS, workload identity federation elsewhere) and holds no Secret.

func (*AzureResourceTags) DeepCopy added in v0.9.0

func (in *AzureResourceTags) DeepCopy() *AzureResourceTags

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureResourceTags.

func (*AzureResourceTags) DeepCopyInto added in v0.9.0

func (in *AzureResourceTags) DeepCopyInto(out *AzureResourceTags)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BackfillRequest added in v0.10.0

type BackfillRequest struct {
	// By is the requesting login.
	By string `json:"by"`
	// At is when the request was received.
	At metav1.Time `json:"at"`
	// Repositories narrows the walk to repositories matching any entry: an
	// exact "owner/name", or an "owner/" prefix covering the whole owner.
	// Empty means the credential's full scope. A truncated backfill re-runs
	// with a narrower prefix rather than paging on.
	// +optional
	// +kubebuilder:validation:MaxItems=50
	// +kubebuilder:validation:items:MinLength=1
	// +kubebuilder:validation:items:MaxLength=200
	Repositories []string `json:"repositories,omitempty"`
}

BackfillRequest records who requested a manual alert backfill, when, and over which repositories. Freshness against status.backfill.backfilledAt decides whether the request is still actionable — the consuming controller never clears spec.

func (*BackfillRequest) DeepCopy added in v0.10.0

func (in *BackfillRequest) DeepCopy() *BackfillRequest

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackfillRequest.

func (*BackfillRequest) DeepCopyInto added in v0.10.0

func (in *BackfillRequest) DeepCopyInto(out *BackfillRequest)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BackfillStatus added in v0.10.0

type BackfillStatus struct {
	// LastRunAt is when the last backfill walk ran.
	// +optional
	LastRunAt *metav1.Time `json:"lastRunAt,omitempty"`
	// Listed counts the open alerts the last walk saw.
	// +optional
	Listed int32 `json:"listed,omitempty"`
	// Ingested counts the alerts folded into findings; the rest were
	// filtered out by the repository prefixes or failed individually (see
	// error).
	// +optional
	Ingested int32 `json:"ingested,omitempty"`
	// Truncated marks a walk that hit the page budget before exhausting the
	// estate; re-request with a narrower repository prefix to cover the
	// rest.
	// +optional
	Truncated bool `json:"truncated,omitempty"`
	// Error carries the last backfill failure; empty when the walk
	// succeeded.
	// +optional
	Error string `json:"error,omitempty"`
	// BackfilledAt echoes spec.backfill.at once that backfill has run; a
	// spec.backfill newer than this triggers another walk.
	// +optional
	BackfilledAt *metav1.Time `json:"backfilledAt,omitempty"`
	// AttemptedAt echoes spec.backfill.at once the controller has attempted
	// that request, whether or not the walk succeeded. Unlike backfilledAt it
	// never gates a retry — it lets observers distinguish a request the
	// controller has not seen yet from one that failed and is being retried.
	// +optional
	AttemptedAt *metav1.Time `json:"attemptedAt,omitempty"`
}

BackfillStatus reports the last manual alert backfill.

func (*BackfillStatus) DeepCopy added in v0.10.0

func (in *BackfillStatus) DeepCopy() *BackfillStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackfillStatus.

func (*BackfillStatus) DeepCopyInto added in v0.10.0

func (in *BackfillStatus) DeepCopyInto(out *BackfillStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CaseSummary added in v0.9.3

type CaseSummary struct {
	// ID of the case.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=128
	ID string `json:"id"`
	// Passed reports the graded outcome.
	Passed bool `json:"passed"`
}

CaseSummary is one case's pass/fail, compact enough for a status list. The full-fidelity result lives in the results ConfigMap.

func (*CaseSummary) DeepCopy added in v0.9.3

func (in *CaseSummary) DeepCopy() *CaseSummary

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CaseSummary.

func (*CaseSummary) DeepCopyInto added in v0.9.3

func (in *CaseSummary) DeepCopyInto(out *CaseSummary)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CloudProvider added in v0.8.0

type CloudProvider string

CloudProvider identifies the cloud platform a resource lives on. +kubebuilder:validation:Enum=google;aws;azure

const (
	// CloudProviderGoogle is Google Cloud.
	CloudProviderGoogle CloudProvider = "google"
	// CloudProviderAWS is Amazon Web Services.
	CloudProviderAWS CloudProvider = "aws"
	// CloudProviderAzure is Microsoft Azure.
	CloudProviderAzure CloudProvider = "azure"
)

Cloud providers.

type Enrichment

type Enrichment struct {
	// Enhancer is the enhancer ID.
	Enhancer string `json:"enhancer"`
	// Owners are code-owner logins the enhancer identified, in preference
	// order.
	// +optional
	Owners []string `json:"owners,omitempty"`
	// Attributes are the enhancer's semi-structured facts (system,
	// environment, tier), projected as tracking labels.
	// +optional
	Attributes map[string]string `json:"attributes,omitempty"`
	// Markdown is arbitrary enhancer content, projected as a sticky tracking
	// comment.
	// +optional
	// +kubebuilder:validation:MaxLength=16384
	Markdown string `json:"markdown,omitempty"`
	// AppliedAt is when the enrichment was recorded.
	AppliedAt metav1.Time `json:"appliedAt"`
}

Enrichment is one enhancer's contribution, written by context-controller and projected as a tracking comment by integration-controller.

func (*Enrichment) DeepCopy

func (in *Enrichment) DeepCopy() *Enrichment

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Enrichment.

func (*Enrichment) DeepCopyInto

func (in *Enrichment) DeepCopyInto(out *Enrichment)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EstimateAggregate added in v0.8.0

type EstimateAggregate struct {
	// Runs that carried an estimate; the denominator for both averages.
	// +optional
	Runs int64 `json:"runs,omitempty"`
	// PredictedTurns summed over those runs.
	// +optional
	PredictedTurns int64 `json:"predictedTurns,omitempty"`
	// ActualTurns summed over those same runs.
	// +optional
	ActualTurns int64 `json:"actualTurns,omitempty"`
	// PredictedOutputTokens summed over those runs.
	// +optional
	PredictedOutputTokens int64 `json:"predictedOutputTokens,omitempty"`
	// ActualOutputTokens summed over those same runs.
	// +optional
	ActualOutputTokens int64 `json:"actualOutputTokens,omitempty"`
}

EstimateAggregate accumulates predicted-against-actual cost over the runs that carried an investigation estimate. The actual sums are matched — they cover exactly the runs the predicted sums cover, not every run in the StageAggregate — so predicted ÷ actual is a like-for-like ratio even when some runs (older objects, runs that died before reporting) have no estimate. Skew is computed client-side as actual ÷ predicted - 1.

func (*EstimateAggregate) DeepCopy added in v0.8.0

func (in *EstimateAggregate) DeepCopy() *EstimateAggregate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EstimateAggregate.

func (*EstimateAggregate) DeepCopyInto added in v0.8.0

func (in *EstimateAggregate) DeepCopyInto(out *EstimateAggregate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Evaluation added in v0.9.3

type Evaluation struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec EvaluationSpec `json:"spec"`
	// +optional
	Status EvaluationStatus `json:"status,omitempty"`
}

Evaluation is one remote evaluation submission: a batch of skill × model × tier units an external client (evolve) uploaded for sandboxed execution. One immutable object per submission, owning one EvaluationUnit per unit; finished evaluations expire on a TTL.

func (*Evaluation) DeepCopy added in v0.9.3

func (in *Evaluation) DeepCopy() *Evaluation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Evaluation.

func (*Evaluation) DeepCopyInto added in v0.9.3

func (in *Evaluation) DeepCopyInto(out *Evaluation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Evaluation) DeepCopyObject added in v0.9.3

func (in *Evaluation) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type EvaluationList added in v0.9.3

type EvaluationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Evaluation `json:"items"`
}

EvaluationList contains a list of Evaluation.

func (*EvaluationList) DeepCopy added in v0.9.3

func (in *EvaluationList) DeepCopy() *EvaluationList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EvaluationList.

func (*EvaluationList) DeepCopyInto added in v0.9.3

func (in *EvaluationList) DeepCopyInto(out *EvaluationList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*EvaluationList) DeepCopyObject added in v0.9.3

func (in *EvaluationList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type EvaluationPhase added in v0.9.3

type EvaluationPhase string

EvaluationPhase is the lifecycle of one evaluation submission. It is a local enum, not part of the Finding phase taxonomy in transitions.go: the evaluation-controller is the single writer and derives the phase from child counts, so no transition table is needed. Expiry is deletion (TTL), not a phase. +kubebuilder:validation:Enum=Pending;Running;Complete;Failed

const (
	// EvaluationPending: accepted, children not yet created.
	EvaluationPending EvaluationPhase = "Pending"
	// EvaluationRunning: children created, at least one not yet settled.
	EvaluationRunning EvaluationPhase = "Running"
	// EvaluationComplete: every unit settled and none failed.
	EvaluationComplete EvaluationPhase = "Complete"
	// EvaluationFailed: every unit settled and at least one failed.
	EvaluationFailed EvaluationPhase = "Failed"
)

Evaluation phases.

type EvaluationSpec added in v0.9.3

type EvaluationSpec struct {
	// Submitter is the authenticated username the API mapped from the
	// bearer token, recorded for display and audit.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=256
	Submitter string `json:"submitter"`
	// Units to run, one child EvaluationUnit each.
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=200
	Units []UnitPlan `json:"units"`
	// TTLSecondsAfterFinished overrides the controller's default retention
	// of the finished Evaluation and everything it owns.
	// +optional
	// +kubebuilder:validation:Minimum=0
	TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"`
}

EvaluationSpec is one submission. It is immutable — resubmission is a new Evaluation (CEL-enforced). +kubebuilder:validation:XValidation:rule="self == oldSelf",message="spec is immutable; submit a new Evaluation"

func (*EvaluationSpec) DeepCopy added in v0.9.3

func (in *EvaluationSpec) DeepCopy() *EvaluationSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EvaluationSpec.

func (*EvaluationSpec) DeepCopyInto added in v0.9.3

func (in *EvaluationSpec) DeepCopyInto(out *EvaluationSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EvaluationStatus added in v0.9.3

type EvaluationStatus struct {
	// Phase of the submission.
	// +optional
	Phase EvaluationPhase `json:"phase,omitempty"`
	// Units is the number of child EvaluationUnits created.
	// +optional
	Units int32 `json:"units,omitempty"`
	// UnitsComplete counts children that settled Complete.
	// +optional
	UnitsComplete int32 `json:"unitsComplete,omitempty"`
	// UnitsFailed counts children that settled Failed.
	// +optional
	UnitsFailed int32 `json:"unitsFailed,omitempty"`
	// StartedAt is when the children were created.
	// +optional
	StartedAt *metav1.Time `json:"startedAt,omitempty"`
	// CompletedAt is when the last unit settled; the TTL clock starts here.
	// +optional
	CompletedAt *metav1.Time `json:"completedAt,omitempty"`
	// Conditions of the submission (UnitsCreated, Complete).
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	// ObservedGeneration is the last spec generation acted on.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

EvaluationStatus aggregates the children. Written only by evaluation-controller; the phase is derived from unit counts.

func (*EvaluationStatus) DeepCopy added in v0.9.3

func (in *EvaluationStatus) DeepCopy() *EvaluationStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EvaluationStatus.

func (*EvaluationStatus) DeepCopyInto added in v0.9.3

func (in *EvaluationStatus) DeepCopyInto(out *EvaluationStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EvaluationUnit added in v0.9.3

type EvaluationUnit struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec EvaluationUnitSpec `json:"spec"`
	// +optional
	Status EvaluationUnitStatus `json:"status,omitempty"`
}

EvaluationUnit is one unit of an Evaluation: a skill evaluated on one model at one tier inside a sandboxed agent Job. One immutable object per unit, owned by the Evaluation; bounded summaries live here, the full result in a per-unit ConfigMap.

func (*EvaluationUnit) DeepCopy added in v0.9.3

func (in *EvaluationUnit) DeepCopy() *EvaluationUnit

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EvaluationUnit.

func (*EvaluationUnit) DeepCopyInto added in v0.9.3

func (in *EvaluationUnit) DeepCopyInto(out *EvaluationUnit)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*EvaluationUnit) DeepCopyObject added in v0.9.3

func (in *EvaluationUnit) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type EvaluationUnitList added in v0.9.3

type EvaluationUnitList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []EvaluationUnit `json:"items"`
}

EvaluationUnitList contains a list of EvaluationUnit.

func (*EvaluationUnitList) DeepCopy added in v0.9.3

func (in *EvaluationUnitList) DeepCopy() *EvaluationUnitList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EvaluationUnitList.

func (*EvaluationUnitList) DeepCopyInto added in v0.9.3

func (in *EvaluationUnitList) DeepCopyInto(out *EvaluationUnitList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*EvaluationUnitList) DeepCopyObject added in v0.9.3

func (in *EvaluationUnitList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type EvaluationUnitSpec added in v0.9.3

type EvaluationUnitSpec struct {
	// EvaluationRef is the owning Evaluation (UID-pinned).
	EvaluationRef ObjectReference `json:"evaluationRef"`
	// Index of the unit within the submission, 0-based.
	// +kubebuilder:validation:Minimum=0
	Index int32 `json:"index"`
	// Unit is the plan, copied down from the parent spec.
	Unit UnitPlan `json:"unit"`
}

EvaluationUnitSpec identifies one unit of its parent Evaluation. It is immutable and self-contained — launch never re-reads the parent (CEL-enforced). +kubebuilder:validation:XValidation:rule="self == oldSelf",message="spec is immutable"

func (*EvaluationUnitSpec) DeepCopy added in v0.9.3

func (in *EvaluationUnitSpec) DeepCopy() *EvaluationUnitSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EvaluationUnitSpec.

func (*EvaluationUnitSpec) DeepCopyInto added in v0.9.3

func (in *EvaluationUnitSpec) DeepCopyInto(out *EvaluationUnitSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EvaluationUnitStatus added in v0.9.3

type EvaluationUnitStatus struct {
	// Phase of the run.
	// +optional
	Phase RunPhase `json:"phase,omitempty"`
	// JobRef locates the agent Job in the agents namespace.
	// +optional
	JobRef *JobReference `json:"jobRef,omitempty"`
	// Harness the scheduler resolved at launch: the first enabled option
	// from the unit's preference list.
	// +optional
	Harness string `json:"harness,omitempty"`
	// Reason a Failed unit failed.
	// +optional
	Reason UnitFailureReason `json:"reason,omitempty"`
	// Detail explains a failure for humans.
	// +optional
	// +kubebuilder:validation:MaxLength=4096
	Detail string `json:"detail,omitempty"`
	// Cases are the per-case outcomes, bounded; the results ConfigMap holds
	// the full record.
	// +optional
	// +kubebuilder:validation:MaxItems=256
	Cases []CaseSummary `json:"cases,omitempty"`
	// CasesPassed counts cases that passed.
	// +optional
	CasesPassed int32 `json:"casesPassed,omitempty"`
	// CasesFailed counts cases that failed.
	// +optional
	CasesFailed int32 `json:"casesFailed,omitempty"`
	// CasesErrored counts cases that errored before grading.
	// +optional
	CasesErrored int32 `json:"casesErrored,omitempty"`
	// Usage accounting for the unit, summed over its agent runs.
	// +optional
	Usage UsageSummary `json:"usage,omitempty"`
	// StartedAt is when the Job launched.
	// +optional
	StartedAt *metav1.Time `json:"startedAt,omitempty"`
	// FinishedAt is when the unit settled.
	// +optional
	FinishedAt *metav1.Time `json:"finishedAt,omitempty"`
	// ElapsedMilliseconds is the unit's wall-clock duration as reported by
	// the pod.
	// +optional
	ElapsedMilliseconds int64 `json:"elapsedMilliseconds,omitempty"`
	// ResultsRef locates the results ConfigMap holding the full-fidelity
	// result entry the client reassembles locally.
	// +optional
	ResultsRef *TranscriptRef `json:"resultsRef,omitempty"`
	// Conditions of the run (Complete).
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	// ObservedGeneration is the last spec generation acted on.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

EvaluationUnitStatus records how the unit ran. Written only by evaluation-controller.

func (*EvaluationUnitStatus) DeepCopy added in v0.9.3

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EvaluationUnitStatus.

func (*EvaluationUnitStatus) DeepCopyInto added in v0.9.3

func (in *EvaluationUnitStatus) DeepCopyInto(out *EvaluationUnitStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Finding

type Finding struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec FindingSpec `json:"spec"`
	// +optional
	Status FindingStatus `json:"status,omitempty"`
}

Finding is the authoritative state machine for one security finding. The tracking item (e.g. a GitHub issue) is a one-way human-facing projection of this resource.

func (*Finding) AlertsBySource added in v0.8.0

func (f *Finding) AlertsBySource() map[string][]Alert

AlertsBySource groups the finding's alerts by the source that produced them, so the verdict write-back can hand each source only its own. Alerts predating Alert.Source fall back to spec.source, which was accurate while accumulation was the sole way alerts arrived.

The result is keyed by source id; an alert whose source cannot be determined at all is dropped rather than guessed at, since dismissing an alert against the wrong tool is worse than not dismissing it.

func (*Finding) DeepCopy

func (in *Finding) DeepCopy() *Finding

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Finding.

func (*Finding) DeepCopyInto

func (in *Finding) DeepCopyInto(out *Finding)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Finding) DeepCopyObject

func (in *Finding) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type FindingCloudResource added in v0.8.0

type FindingCloudResource struct {
	// Provider is the cloud platform the resource lives on.
	Provider CloudProvider `json:"provider"`
	// Name is the provider's canonical, unique resource identifier — an SCC
	// resourceName, e.g. "//storage.googleapis.com/projects/p/buckets/b". It
	// is the accumulation scope for cloud findings, in place of the
	// repository URL.
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`
	// Type is the provider's resource type, e.g. "google.cloud.storage.Bucket".
	// +optional
	Type string `json:"type,omitempty"`
	// Project is the enclosing project, subscription, or account id.
	// +optional
	Project string `json:"project,omitempty"`
	// Location is the region or zone, when the provider reports one.
	// +optional
	Location string `json:"location,omitempty"`
	// DisplayName is the resource's human-facing name.
	// +optional
	DisplayName string `json:"displayName,omitempty"`
}

FindingCloudResource identifies the cloud resource a finding was raised against, for findings about infrastructure rather than repository code. It is what lets a context enhancer resolve a repository the scanner could not name: the enhancer looks the resource up with the cloud provider's own API and reads the ownership labels off it.

func (*FindingCloudResource) DeepCopy added in v0.8.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FindingCloudResource.

func (*FindingCloudResource) DeepCopyInto added in v0.8.0

func (in *FindingCloudResource) DeepCopyInto(out *FindingCloudResource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FindingList

type FindingList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Finding `json:"items"`
}

FindingList contains a list of Finding.

func (*FindingList) DeepCopy

func (in *FindingList) DeepCopy() *FindingList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FindingList.

func (*FindingList) DeepCopyInto

func (in *FindingList) DeepCopyInto(out *FindingList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FindingList) DeepCopyObject

func (in *FindingList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type FindingRepository

type FindingRepository struct {
	// Type of forge the repository lives on.
	Type RepositoryType `json:"type"`
	// URL is the normalized https URL of the repository.
	// +kubebuilder:validation:MinLength=1
	URL string `json:"url"`
	// Name is the human form ("owner/repo"), for display.
	// +optional
	Name string `json:"name,omitempty"`
	// DefaultBranch of the repository at ingest time.
	// +optional
	DefaultBranch string `json:"defaultBranch,omitempty"`
}

FindingRepository locates the repository a finding belongs to. It is nil until a repository is identified: scanner sources name one at ingest, while a cloud finding arrives repo-less and may have one resolved later by a context enhancer (from the cloud resource's ownership labels). A finding still repo-less when the investigation gate runs can never reach the Queued/Remediating phases — there is no tree to work in.

func (*FindingRepository) DeepCopy

func (in *FindingRepository) DeepCopy() *FindingRepository

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FindingRepository.

func (*FindingRepository) DeepCopyInto

func (in *FindingRepository) DeepCopyInto(out *FindingRepository)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FindingRollup

type FindingRollup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec FindingRollupSpec `json:"spec"`
	// +optional
	Status FindingRollupStatus `json:"status,omitempty"`
}

FindingRollup accumulates all-time statistics for one scope value (total, one repository, one harness, or one model). Rollups survive the TTL deletion of the findings they aggregate; they live only in etcd, so a cluster rebuild resets the stats epoch.

func (*FindingRollup) DeepCopy

func (in *FindingRollup) DeepCopy() *FindingRollup

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FindingRollup.

func (*FindingRollup) DeepCopyInto

func (in *FindingRollup) DeepCopyInto(out *FindingRollup)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FindingRollup) DeepCopyObject

func (in *FindingRollup) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type FindingRollupList

type FindingRollupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []FindingRollup `json:"items"`
}

FindingRollupList contains a list of FindingRollup.

func (*FindingRollupList) DeepCopy

func (in *FindingRollupList) DeepCopy() *FindingRollupList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FindingRollupList.

func (*FindingRollupList) DeepCopyInto

func (in *FindingRollupList) DeepCopyInto(out *FindingRollupList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FindingRollupList) DeepCopyObject

func (in *FindingRollupList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type FindingRollupSpec

type FindingRollupSpec struct {
	// Scope this rollup aggregates.
	Scope RollupScope `json:"scope"`
}

FindingRollupSpec pins the scope; it is immutable. +kubebuilder:validation:XValidation:rule="self == oldSelf",message="spec.scope is immutable"

func (*FindingRollupSpec) DeepCopy

func (in *FindingRollupSpec) DeepCopy() *FindingRollupSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FindingRollupSpec.

func (*FindingRollupSpec) DeepCopyInto

func (in *FindingRollupSpec) DeepCopyInto(out *FindingRollupSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FindingRollupStatus

type FindingRollupStatus struct {
	// SchemaVersion of the bucket layout; see RollupSchemaVersion.
	// +optional
	SchemaVersion int32 `json:"schemaVersion,omitempty"`
	// FirstProcessed is the stats epoch for this scope.
	// +optional
	FirstProcessed *metav1.Time `json:"firstProcessed,omitempty"`
	// LastProcessed is the most recent aggregation.
	// +optional
	LastProcessed *metav1.Time `json:"lastProcessed,omitempty"`
	// Bucket is the all-time aggregate.
	// +optional
	Bucket RollupBucket `json:"bucket,omitempty"`
	// Monthly trend line keyed "2026-07" (total scope only).
	// +optional
	Monthly map[string]MonthlyBucket `json:"monthly,omitempty"`
	// Recent is the exactly-once ledger: the last 512 applied delta keys
	// ("i:<uid>", "r:<uid>", "f:<uid>:<seq>").
	// +optional
	// +kubebuilder:validation:MaxItems=512
	Recent []string `json:"recent,omitempty"`
}

FindingRollupStatus is the accumulated statistics. All data lives in status; the ledger makes application exactly-once per contributing object.

func (*FindingRollupStatus) DeepCopy

func (in *FindingRollupStatus) DeepCopy() *FindingRollupStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FindingRollupStatus.

func (*FindingRollupStatus) DeepCopyInto

func (in *FindingRollupStatus) DeepCopyInto(out *FindingRollupStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FindingSpec

type FindingSpec struct {
	// IntegrationRef names the Integration that ingested this finding.
	IntegrationRef LocalObjectReference `json:"integrationRef"`
	// TrackingRef names the Integration that projects this finding to its
	// tracking system, denormalized at creation (stable if the ingesting
	// integration later retargets).
	// +optional
	TrackingRef *LocalObjectReference `json:"trackingRef,omitempty"`
	// Source is the source handler ID (e.g. github-code-scanning).
	// +kubebuilder:validation:MinLength=1
	Source string `json:"source"`
	// Repository the finding belongs to; nil when none has been identified.
	// integration-controller sets it at ingest for sources that name a
	// repository. For a cloud finding it starts nil and context-controller
	// may set it — SET-ONCE, never overwritten. Three things depend on that:
	// the rollup ledger re-derives its scope key at reversal time, the
	// investigation gate's Repository artifact has an immutable spec.url with
	// no update path, and the agent Jobs snapshot the repo in an annotation.
	// A mutable value would desynchronize all three silently.
	// +optional
	Repository *FindingRepository `json:"repository,omitempty"`
	// CloudResource identifies the cloud resource this finding was raised
	// against, for findings about infrastructure rather than repository code.
	// Written at ingest and never again; it is what an enhancer resolves
	// repository from.
	// +optional
	CloudResource *FindingCloudResource `json:"cloudResource,omitempty"`
	// Advisories identify the vulnerability, most authoritative first
	// (GHSA > CVE > CWE); [0] is the accumulation key.
	// +kubebuilder:validation:MinItems=1
	Advisories []string `json:"advisories"`
	// RuleID is the scanner rule that fired.
	// +optional
	RuleID string `json:"ruleID,omitempty"`
	// Title is the human summary line.
	// +optional
	Title string `json:"title,omitempty"`
	// Description is the scanner's full description, truncated at ingest.
	// +optional
	// +kubebuilder:validation:MaxLength=65536
	Description string `json:"description,omitempty"`
	// Severity assigned by the scanner.
	// +optional
	Severity Level `json:"severity,omitempty"`
	// Alerts folded into this finding during accumulation.
	// +optional
	// +kubebuilder:validation:MaxItems=64
	Alerts []Alert `json:"alerts,omitempty"`
	// OverflowAlerts counts alerts dropped past the cap (total observed =
	// len(alerts) + overflowAlerts).
	// +optional
	OverflowAlerts int32 `json:"overflowAlerts,omitempty"`
	// Related is the finding's relationship edges.
	// +optional
	// +kubebuilder:validation:MaxItems=32
	Related []RelatedFinding `json:"related,omitempty"`
	// Suspend pauses pipeline progress for this finding (human-written).
	// +optional
	Suspend bool `json:"suspend,omitempty"`
	// Approval is the recorded human /approve, written by
	// integration-controller from the tracking system's comment webhook.
	// +optional
	Approval *Approval `json:"approval,omitempty"`
	// Retry requests recovery of a Failed finding back to the state it
	// failed from (human-written). Actionable while newer than
	// status.completedAt; the phase-owning controller consumes it by
	// performing the transition.
	// +optional
	Retry *ActionRequest `json:"retry,omitempty"`
	// Expedite marks the finding urgent for its whole lifetime
	// (human-written): the investigation gate skips the accumulation window
	// and minimum age, and both schedulers rank the finding's runs ahead of
	// all non-expedited work.
	// +optional
	Expedite *ActionRequest `json:"expedite,omitempty"`
}

FindingSpec is the finding to triage. integration-controller writes it at ingest and during accumulation; humans may set suspend and add related-to edges. The one other writer is context-controller, which sets repository exactly once when a cloud finding arrived without one — see that field.

func (*FindingSpec) DeepCopy

func (in *FindingSpec) DeepCopy() *FindingSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FindingSpec.

func (*FindingSpec) DeepCopyInto

func (in *FindingSpec) DeepCopyInto(out *FindingSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FindingStatus

type FindingStatus struct {
	// Phase of the lifecycle (see transitions.go for edges and writers).
	// +optional
	Phase Phase `json:"phase,omitempty"`
	// PhaseTimes is the append-only phase entry log.
	// +optional
	PhaseTimes []PhaseTime `json:"phaseTimes,omitempty"`
	// Conditions of the finding.
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	// ObservedGeneration is the last spec generation acted on.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// FirstObservedAt is when the first alert arrived (integration).
	// +optional
	FirstObservedAt *metav1.Time `json:"firstObservedAt,omitempty"`
	// AccumulateUntil closes the accumulation window (integration).
	// +optional
	AccumulateUntil *metav1.Time `json:"accumulateUntil,omitempty"`
	// Tracking links the projected tracking item (integration).
	// +optional
	Tracking *TrackingStatus `json:"tracking,omitempty"`
	// Owners are the humans responsible for the finding (context).
	// +optional
	Owners []string `json:"owners,omitempty"`
	// Enrichments are the enhancer contributions (context).
	// +optional
	// +kubebuilder:validation:MaxItems=8
	Enrichments []Enrichment `json:"enrichments,omitempty"`
	// Priority is the scheduling priority derived from investigation results
	// (investigation) — the remediation queue's sort dimension.
	// +optional
	Priority Level `json:"priority,omitempty"`
	// Investigation summarizes the latest Investigation child (investigation).
	// +optional
	Investigation *InvestigationSummary `json:"investigation,omitempty"`
	// Remediation summarizes the latest Remediation child (remediation).
	// +optional
	Remediation *RemediationSummary `json:"remediation,omitempty"`
	// PullRequest is the remediation PR (remediation opens; integration owns
	// state/mergedAt).
	// +optional
	PullRequest *PullRequestStatus `json:"pullRequest,omitempty"`
	// Attempts tallies agent runs (respective controllers).
	// +optional
	Attempts AttemptCounts `json:"attempts,omitempty"`
	// ActiveRun points at the child currently running (respective
	// controllers).
	// +optional
	ActiveRun *ActiveRun `json:"activeRun,omitempty"`
	// Forge names the resolved Forge, for observability.
	// +optional
	Forge *LocalObjectReference `json:"forge,omitempty"`
	// LastFailureReason explains the most recent failed edge.
	// +optional
	// +kubebuilder:validation:MaxLength=4096
	LastFailureReason string `json:"lastFailureReason,omitempty"`
	// CompletedAt is set on terminal-phase entry and cleared on revival; the
	// TTL contract is completedAt + TTL.
	// +optional
	CompletedAt *metav1.Time `json:"completedAt,omitempty"`
}

FindingStatus is the finding's observed state. Field writers are noted per field; every field has exactly one writer component.

func (*FindingStatus) DeepCopy

func (in *FindingStatus) DeepCopy() *FindingStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FindingStatus.

func (*FindingStatus) DeepCopyInto

func (in *FindingStatus) DeepCopyInto(out *FindingStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Forge

type Forge struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec ForgeSpec `json:"spec"`
	// +optional
	Status ForgeStatus `json:"status,omitempty"`
}

Forge holds repository credentials: source-controller resolves a Finding's repository to a Forge for read-only clone tokens; remediation-controller resolves the same Forge for scoped write tokens (branch push, pull request). Both go through the shared internal/forge package.

func (*Forge) DeepCopy

func (in *Forge) DeepCopy() *Forge

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Forge.

func (*Forge) DeepCopyInto

func (in *Forge) DeepCopyInto(out *Forge)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Forge) DeepCopyObject

func (in *Forge) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ForgeList

type ForgeList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Forge `json:"items"`
}

ForgeList contains a list of Forge.

func (*ForgeList) DeepCopy

func (in *ForgeList) DeepCopy() *ForgeList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ForgeList.

func (*ForgeList) DeepCopyInto

func (in *ForgeList) DeepCopyInto(out *ForgeList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ForgeList) DeepCopyObject

func (in *ForgeList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ForgeProvider

type ForgeProvider string

ForgeProvider identifies the forge family a Forge authenticates against. +kubebuilder:validation:Enum=github

const (
	ForgeProviderGitHub ForgeProvider = "github"
)

Forge providers.

type ForgeSpec

type ForgeSpec struct {
	// Provider is the forge family.
	Provider ForgeProvider `json:"provider"`
	// BaseURL is the forge host; empty means the provider's public host
	// (github.com).
	// +optional
	BaseURL string `json:"baseURL,omitempty"`
	// Proxy routes this forge's GitHub traffic through an HTTP/HTTPS forward
	// proxy, overriding the process proxy environment for this forge.
	// +optional
	Proxy *ProxyConfig `json:"proxy,omitempty"`
	// SecretRef names the credential Secret: key "token" (PAT, dev) or keys
	// "appID" + "privateKey" (GitHub App). With spec.proxy set, optional keys
	// "proxyUsername" + "proxyPassword" carry the proxy's basic-auth
	// credentials.
	SecretRef LocalSecretReference `json:"secretRef"`
	// Orgs restricts this forge to the listed organizations; empty means all.
	// +optional
	Orgs []string `json:"orgs,omitempty"`
	// Repositories restricts this forge to repositories whose "owner/name"
	// matches any of the listed RE2 regular expressions; empty means all.
	// +optional
	Repositories []string `json:"repositories,omitempty"`
	// Interval between credential revalidations.
	// +optional
	// +kubebuilder:default="10m"
	Interval metav1.Duration `json:"interval,omitempty"`
	// Suspend pauses reconciliation of this forge.
	// +optional
	Suspend bool `json:"suspend,omitempty"`
}

ForgeSpec configures repository credentials for one forge, scoped by optional org and repository filters. Matching (in internal/forge): the repository URL's host must equal the forge host, then the org allowlist, then the repository regexes; when several Forges match, the more constrained spec wins (orgs set beats unset, then repositories set beats unset) and a remaining tie is a configuration error surfaced on the Finding.

func (*ForgeSpec) DeepCopy

func (in *ForgeSpec) DeepCopy() *ForgeSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ForgeSpec.

func (*ForgeSpec) DeepCopyInto

func (in *ForgeSpec) DeepCopyInto(out *ForgeSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ForgeStatus

type ForgeStatus struct {
	// Conditions of the forge (Ready: credential valid).
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	// ObservedGeneration is the last spec generation acted on.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// Installations summarizes the App installations (github App auth only).
	// +optional
	Installations []InstallationSummary `json:"installations,omitempty"`
}

ForgeStatus is the forge's observed state.

func (*ForgeStatus) DeepCopy

func (in *ForgeStatus) DeepCopy() *ForgeStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ForgeStatus.

func (*ForgeStatus) DeepCopyInto

func (in *ForgeStatus) DeepCopyInto(out *ForgeStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GenericEnhancer added in v0.9.1

type GenericEnhancer struct {
	// Enabled turns the enhancer capability on.
	Enabled bool `json:"enabled"`
	// URL patchy POSTs enhancement requests to.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:Pattern=`^https?://.+$`
	URL string `json:"url"`
	// Timeout bounds each call.
	// +optional
	// +kubebuilder:default="60s"
	Timeout metav1.Duration `json:"timeout,omitempty"`
}

GenericEnhancer configures the external context enhancer: during enhancement patchy POSTs each finding's issue view to the URL and the response body is the enrichment (empty or 204 contributes nothing). The call is synchronous and signed like every other generic exchange.

func (*GenericEnhancer) DeepCopy added in v0.9.1

func (in *GenericEnhancer) DeepCopy() *GenericEnhancer

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericEnhancer.

func (*GenericEnhancer) DeepCopyInto added in v0.9.1

func (in *GenericEnhancer) DeepCopyInto(out *GenericEnhancer)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GenericIntegration added in v0.9.1

type GenericIntegration struct {
	// Source enables the inbound findings webhook.
	// +optional
	Source *GenericSource `json:"source,omitempty"`
	// Enhance enables the outbound context enhancer.
	// +optional
	Enhance *GenericEnhancer `json:"enhance,omitempty"`
}

GenericIntegration is the generic provider block: an external HTTP process acting as a finding source, a context enhancer, or both. Unlike every other provider, generic is not a namespace singleton — each generic Integration is its own identity: its name is the finding source id, the enhancer attribution, and the webhook path segment, so any number may coexist.

func (*GenericIntegration) DeepCopy added in v0.9.1

func (in *GenericIntegration) DeepCopy() *GenericIntegration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericIntegration.

func (*GenericIntegration) DeepCopyInto added in v0.9.1

func (in *GenericIntegration) DeepCopyInto(out *GenericIntegration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GenericResolver added in v0.9.1

type GenericResolver struct {
	// Enabled turns the write-back on.
	Enabled bool `json:"enabled"`
	// URL patchy POSTs verdicts to.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:Pattern=`^https?://.+$`
	URL string `json:"url"`
	// Timeout bounds each call.
	// +optional
	// +kubebuilder:default="60s"
	Timeout metav1.Duration `json:"timeout,omitempty"`
}

GenericResolver configures verdict write-back to the external process: on a dismissed finding patchy POSTs the verdict and the finding's alerts to the URL, signing the body the same way inbound deliveries are signed. The process must treat the call as idempotent — patchy retries on failure.

func (*GenericResolver) DeepCopy added in v0.9.1

func (in *GenericResolver) DeepCopy() *GenericResolver

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericResolver.

func (*GenericResolver) DeepCopyInto added in v0.9.1

func (in *GenericResolver) DeepCopyInto(out *GenericResolver)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GenericSource added in v0.9.1

type GenericSource struct {
	// Enabled turns the inbound receiver on for this integration.
	Enabled bool `json:"enabled"`
	// MinSeverity drops findings below this severity at ingestion.
	// +optional
	// +kubebuilder:default=low
	MinSeverity Level `json:"minSeverity,omitempty"`
	// Resolver enables verdict write-back to the external process.
	// +optional
	Resolver *GenericResolver `json:"resolver,omitempty"`
}

GenericSource configures the inbound findings webhook: the external process POSTs patchy's documented findings payload (docs/integrations/generic.md) to /generic/<integration-name>/webhooks, HMAC-signing each body with the shared secret. Built for sources that are not event-driven — a process that queries a warehouse store on its own schedule pushes whatever it found.

func (*GenericSource) DeepCopy added in v0.9.1

func (in *GenericSource) DeepCopy() *GenericSource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericSource.

func (*GenericSource) DeepCopyInto added in v0.9.1

func (in *GenericSource) DeepCopyInto(out *GenericSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GitHubCodeScanningAlerts

type GitHubCodeScanningAlerts struct {
	// Enabled turns the code-scanning capability on.
	Enabled bool `json:"enabled"`
}

GitHubCodeScanningAlerts configures scanner ingestion from GitHub code scanning (GHAS/CodeQL) webhooks, including alert dismissal on an "ignore" verdict.

func (*GitHubCodeScanningAlerts) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitHubCodeScanningAlerts.

func (*GitHubCodeScanningAlerts) DeepCopyInto

func (in *GitHubCodeScanningAlerts) DeepCopyInto(out *GitHubCodeScanningAlerts)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GitHubIntegration

type GitHubIntegration struct {
	// BaseURL points at a GitHub Enterprise Server host; empty means
	// github.com.
	// +optional
	BaseURL string `json:"baseURL,omitempty"`
	// Proxy routes this integration's GitHub traffic through an HTTP/HTTPS
	// forward proxy, overriding the process proxy environment for this
	// integration.
	// +optional
	Proxy *ProxyConfig `json:"proxy,omitempty"`
	// Issues enables the tracking projection.
	// +optional
	Issues *GitHubIssues `json:"issues,omitempty"`
	// CodeScanningAlerts enables scanner ingestion.
	// +optional
	CodeScanningAlerts *GitHubCodeScanningAlerts `json:"codeScanningAlerts,omitempty"`
	// Redelivery enables the failed-delivery sweep.
	// +optional
	Redelivery *GitHubRedelivery `json:"redelivery,omitempty"`
}

GitHubIntegration is the github provider block: one GitHub App covering any combination of the capabilities.

func (*GitHubIntegration) DeepCopy

func (in *GitHubIntegration) DeepCopy() *GitHubIntegration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitHubIntegration.

func (*GitHubIntegration) DeepCopyInto

func (in *GitHubIntegration) DeepCopyInto(out *GitHubIntegration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GitHubIssues

type GitHubIssues struct {
	// Enabled turns the issues capability on.
	Enabled bool `json:"enabled"`
	// ApproveComment is the comment command that approves a held remediation.
	// +optional
	// +kubebuilder:default="/approve"
	ApproveComment string `json:"approveComment,omitempty"`
	// FallbackRepository ("owner/repo") receives the tracking issues of
	// findings that have no repository of their own — cloud findings whose
	// resource carries no ownership labels. Without it those findings are
	// visible only through kubectl and the status page. They still cannot be
	// remediated: the issue is a human surface, not a work tree.
	// +optional
	FallbackRepository string `json:"fallbackRepository,omitempty"`
}

GitHubIssues configures the tracking projection: findings are projected as GitHub issues, and the human signals on those issues (/approve comments, issue close/reopen, pull-request merge) flow back into Finding state.

func (*GitHubIssues) DeepCopy

func (in *GitHubIssues) DeepCopy() *GitHubIssues

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitHubIssues.

func (*GitHubIssues) DeepCopyInto

func (in *GitHubIssues) DeepCopyInto(out *GitHubIssues)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GitHubRedelivery added in v0.5.4

type GitHubRedelivery struct {
	// Enabled turns the sweep on. Requires App credentials — the delivery
	// log is App-scoped, so a PAT integration cannot sweep.
	Enabled bool `json:"enabled"`
	// Lookback bounds how far back each sweep scans the delivery log.
	// GitHub retains deliveries for 30 days.
	// +optional
	// +kubebuilder:default="24h"
	Lookback metav1.Duration `json:"lookback,omitempty"`
}

GitHubRedelivery configures the failed-delivery sweep: on every reconcile interval the controller lists the App webhook's recent deliveries and asks GitHub to redeliver those that never got a 2xx — deliveries missed while the receiver was down or its queue was full. GitHub does not retry failed deliveries on its own; without the sweep they sit in the 30-day delivery log until redelivered by hand.

func (*GitHubRedelivery) DeepCopy added in v0.5.4

func (in *GitHubRedelivery) DeepCopy() *GitHubRedelivery

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitHubRedelivery.

func (*GitHubRedelivery) DeepCopyInto added in v0.5.4

func (in *GitHubRedelivery) DeepCopyInto(out *GitHubRedelivery)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GoogleCloudAssetInventory added in v0.9.0

type GoogleCloudAssetInventory struct {
	// Enabled turns the enhancer capability on.
	Enabled bool `json:"enabled"`
	// Scope bounds the asset search: an organization, folder, or project.
	// +kubebuilder:validation:Pattern=`^(organizations|folders|projects)/.+$`
	Scope string `json:"scope"`
	// RepositoryHost is the forge host repositories named by labels live on;
	// empty means github.com.
	// +optional
	RepositoryHost string `json:"repositoryHost,omitempty"`
	// Labels overrides the resource label names the enhancer reads.
	// +optional
	Labels *AssetLabelKeys `json:"labels,omitempty"`
}

GoogleCloudAssetInventory enables the context enhancer that resolves the repository (and attributes) of any finding whose cloud resource lives on Google Cloud — whichever source ingested it — by reading the resource's ownership labels from Cloud Asset Inventory. Read-only: the context-controller authenticates by workload identity (roles/cloudasset.viewer) and holds no Secret.

func (*GoogleCloudAssetInventory) DeepCopy added in v0.9.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleCloudAssetInventory.

func (*GoogleCloudAssetInventory) DeepCopyInto added in v0.9.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GoogleCloudIntegration added in v0.8.0

type GoogleCloudIntegration struct {
	// SecurityCommandCenter enables SCC finding ingestion.
	// +optional
	SecurityCommandCenter *GoogleCloudSCC `json:"securityCommandCenter,omitempty"`
	// CloudAssetInventory enables the ownership-label enhancer.
	// +optional
	CloudAssetInventory *GoogleCloudAssetInventory `json:"cloudAssetInventory,omitempty"`
}

GoogleCloudIntegration is the google-cloud provider block. It carries no credential Secret: inbound findings authenticate themselves with a Pub/Sub-signed OIDC token, and the asset-inventory enhancer authenticates by workload identity. The two capabilities are independent — an integration may enhance findings from another source (e.g. Wiz) without ingesting from Security Command Center, or vice versa.

func (*GoogleCloudIntegration) DeepCopy added in v0.8.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleCloudIntegration.

func (*GoogleCloudIntegration) DeepCopyInto added in v0.8.0

func (in *GoogleCloudIntegration) DeepCopyInto(out *GoogleCloudIntegration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GoogleCloudSCC added in v0.8.0

type GoogleCloudSCC struct {
	// Enabled turns the SCC ingestion capability on.
	Enabled bool `json:"enabled"`
	// Audience the push subscription's OIDC token must carry, as configured
	// on the subscription's oidcToken.audience.
	// +kubebuilder:validation:MinLength=1
	Audience string `json:"audience"`
	// ServiceAccount is the email address the push token must be issued for;
	// a token from any other identity is rejected.
	// +kubebuilder:validation:MinLength=1
	ServiceAccount string `json:"serviceAccount"`
	// MinSeverity drops notifications below this severity before they become
	// findings. The notification filter should do most of this work; this is
	// the backstop.
	// +optional
	// +kubebuilder:default=low
	MinSeverity Level `json:"minSeverity,omitempty"`
	// Organization is the numeric Google Cloud organization id, used to
	// compose Console links for findings that carry no externalUri.
	// +optional
	Organization string `json:"organization,omitempty"`
	// Mute configures the ignore-verdict write-back (reserved).
	// +optional
	Mute *GoogleCloudSCCMute `json:"mute,omitempty"`
}

GoogleCloudSCC configures ingestion of Security Command Center findings. SCC has no webhook: a NotificationConfig publishes findings to a Pub/Sub topic and a push subscription forwards them to the receiver, which authenticates the OIDC token Pub/Sub signs rather than an HMAC — a push subscription cannot compute one over the body.

func (*GoogleCloudSCC) DeepCopy added in v0.8.0

func (in *GoogleCloudSCC) DeepCopy() *GoogleCloudSCC

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleCloudSCC.

func (*GoogleCloudSCC) DeepCopyInto added in v0.8.0

func (in *GoogleCloudSCC) DeepCopyInto(out *GoogleCloudSCC)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GoogleCloudSCCMute added in v0.8.0

type GoogleCloudSCCMute struct {
	// Enabled turns the mute-on-ignore write-back on.
	Enabled bool `json:"enabled"`
}

GoogleCloudSCCMute configures muting the Security Command Center finding when the investigation returns an "ignore" verdict — the cloud analogue of dismissing a code-scanning alert.

RESERVED: the field is accepted and validated but not yet honoured. Muting needs securitycenter.findings.setMute, a Google Cloud write permission the integration-controller does not currently hold; the write-back seam (pkg/source.Resolver) is in place so enabling it is one implementation.

func (*GoogleCloudSCCMute) DeepCopy added in v0.8.0

func (in *GoogleCloudSCCMute) DeepCopy() *GoogleCloudSCCMute

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleCloudSCCMute.

func (*GoogleCloudSCCMute) DeepCopyInto added in v0.8.0

func (in *GoogleCloudSCCMute) DeepCopyInto(out *GoogleCloudSCCMute)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HarnessOption added in v0.9.3

type HarnessOption struct {
	// Harness id (e.g. "claude", "codex").
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=64
	Harness string `json:"harness"`
	// ModelID is the harness-native model identifier the unit's model maps to
	// on this harness.
	// +optional
	// +kubebuilder:validation:MaxLength=256
	ModelID string `json:"modelID,omitempty"`
}

HarnessOption is one acceptable harness for a unit, in preference order: the scheduler launches the first option whose harness is enabled in the runner fleet.

func (*HarnessOption) DeepCopy added in v0.9.3

func (in *HarnessOption) DeepCopy() *HarnessOption

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarnessOption.

func (*HarnessOption) DeepCopyInto added in v0.9.3

func (in *HarnessOption) DeepCopyInto(out *HarnessOption)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HoldReason added in v0.8.0

type HoldReason string

HoldReason names why a finding stopped in AwaitingApproval instead of going straight to Queued. A hold can have several reasons at once, so they are reported as a set rather than folded into one flag. +kubebuilder:validation:Enum=breakingChangeAvailable;lowConfidence;exceedsAutomatedTurns;exceedsAutomatedTokens

const (
	// HoldBreakingChangeAvailable: a better-but-breaking fix exists, so a
	// human should choose between it and the backwards-compatible one.
	HoldBreakingChangeAvailable HoldReason = "breakingChangeAvailable"
	// HoldLowConfidence: the investigation's confidence fell below the
	// configured threshold.
	HoldLowConfidence HoldReason = "lowConfidence"
	// HoldExceedsAutomatedTurns: the fix is predicted to need more turns than
	// patchy will spend unattended, so a human must authorize the larger
	// budget before it runs.
	HoldExceedsAutomatedTurns HoldReason = "exceedsAutomatedTurns"
	// HoldExceedsAutomatedTokens: as above, for output tokens.
	HoldExceedsAutomatedTokens HoldReason = "exceedsAutomatedTokens"
)

Approval-hold reasons.

type InstallationSummary

type InstallationSummary struct {
	// ID of the installation.
	ID int64 `json:"id"`
	// Account the App is installed on.
	Account string `json:"account"`
	// Repositories the installation covers.
	// +optional
	Repositories int32 `json:"repositories,omitempty"`
}

InstallationSummary counts one GitHub App installation — counts and accounts only, never a repository list (the estate is ~15K repositories).

func (*InstallationSummary) DeepCopy

func (in *InstallationSummary) DeepCopy() *InstallationSummary

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstallationSummary.

func (*InstallationSummary) DeepCopyInto

func (in *InstallationSummary) DeepCopyInto(out *InstallationSummary)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Integration

type Integration struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec IntegrationSpec `json:"spec"`
	// +optional
	Status IntegrationStatus `json:"status,omitempty"`
}

Integration configures one external system patchy exchanges finding state with: scanners in (code-scanning alerts, Security Command Center, Wiz, or any process speaking the generic HTTP contract), context enhancers (Cloud Asset Inventory, AWS resource tags, Azure resource tags, generic HTTP), tracking out (GitHub issues), and the human signals flowing back.

A generic Integration's name doubles as its finding source id and label value, so it must not shadow a built-in source id and must fit a label. +kubebuilder:validation:XValidation:rule="self.spec.provider != 'generic' || !has(self.metadata.name) || !(self.metadata.name in ['ghas', 'gcp-scc', 'wiz-issues', 'wiz-defend'])",message="a generic integration may not use a reserved source id as its name" +kubebuilder:validation:XValidation:rule="self.spec.provider != 'generic' || !has(self.metadata.name) || size(self.metadata.name) <= 63",message="a generic integration's name must be at most 63 characters"

func (*Integration) DeepCopy

func (in *Integration) DeepCopy() *Integration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Integration.

func (*Integration) DeepCopyInto

func (in *Integration) DeepCopyInto(out *Integration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Integration) DeepCopyObject

func (in *Integration) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type IntegrationList

type IntegrationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Integration `json:"items"`
}

IntegrationList contains a list of Integration.

func (*IntegrationList) DeepCopy

func (in *IntegrationList) DeepCopy() *IntegrationList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationList.

func (*IntegrationList) DeepCopyInto

func (in *IntegrationList) DeepCopyInto(out *IntegrationList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*IntegrationList) DeepCopyObject

func (in *IntegrationList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type IntegrationProvider

type IntegrationProvider string

IntegrationProvider identifies the external system an Integration talks to. +kubebuilder:validation:Enum=github;google-cloud;wiz;aws;azure;generic

const (
	IntegrationProviderGitHub      IntegrationProvider = "github"
	IntegrationProviderGoogleCloud IntegrationProvider = "google-cloud"
	IntegrationProviderWiz         IntegrationProvider = "wiz"
	IntegrationProviderAWS         IntegrationProvider = "aws"
	IntegrationProviderAzure       IntegrationProvider = "azure"
	IntegrationProviderGeneric     IntegrationProvider = "generic"
)

Integration providers.

type IntegrationSpec

type IntegrationSpec struct {
	// Provider is the external system type.
	Provider IntegrationProvider `json:"provider"`
	// SecretRef names the credential Secret. For github: either key "token"
	// (PAT, dev) or keys "appID" + "privateKey" (GitHub App), plus
	// "webhookSecret" for receiver HMAC validation, plus optional keys
	// "proxyUsername" + "proxyPassword" when spec.github.proxy needs basic
	// auth. For wiz: key
	// "webhookToken" (the shared bearer token deliveries carry), plus keys
	// "clientId" + "clientSecret" when spec.wiz.api enables write-back. For
	// generic: key "webhookSecret", the shared HMAC secret signing both
	// inbound deliveries and patchy's outbound resolver/enhancer calls.
	// Required for github, wiz, and generic, optional otherwise — a
	// google-cloud integration holds no credential, since Pub/Sub
	// authenticates itself with a signed OIDC token. It stays permitted for
	// every provider so a future capability that does need one (SCC
	// mute-on-ignore) needs no schema change.
	// +optional
	SecretRef *LocalSecretReference `json:"secretRef,omitempty"`
	// Interval between credential revalidations.
	// +optional
	// +kubebuilder:default="10m"
	Interval metav1.Duration `json:"interval,omitempty"`
	// Suspend pauses reconciliation of this integration.
	// +optional
	Suspend bool `json:"suspend,omitempty"`
	// Replay requests one full redelivery of every webhook delivery in the
	// lookback window, including deliveries that already succeeded (the
	// receiver dedups; ingestion is idempotent). Freshness against
	// status.redelivery.replayedAt decides whether the request is still
	// actionable — the controller never clears spec.
	// +optional
	Replay *ActionRequest `json:"replay,omitempty"`
	// Reset requests the demo reset (stamped by the status page): the
	// controller permanently deletes every finding's tracking issue,
	// reopens the dismissed findings' code-scanning alerts, deletes every
	// pipeline resource, and drops the receiver's delivery dedup window so
	// redeliveries of already-handled GUIDs are ingested again. Issue
	// deletion requires admin-level repository permission on the
	// credential. Freshness against status.resetAt decides whether the
	// request is still actionable — the controller never clears spec.
	// +optional
	Reset *ActionRequest `json:"reset,omitempty"`
	// Backfill requests one bounded list-alerts walk of the provider's open
	// alerts, ingesting the ones that predate webhook coverage — alerts
	// raised before the App was installed on (or associated with) their
	// repository, which no replay of the delivery log can ever surface.
	// Ingestion is idempotent, so re-listing alerts that already have
	// findings is safe. Freshness against status.backfill.backfilledAt
	// decides whether the request is still actionable — the controller
	// never clears spec.
	// +optional
	Backfill *BackfillRequest `json:"backfill,omitempty"`
	// GitHub is the github provider block.
	// +optional
	GitHub *GitHubIntegration `json:"github,omitempty"`
	// GoogleCloud is the google-cloud provider block.
	// +optional
	GoogleCloud *GoogleCloudIntegration `json:"googleCloud,omitempty"`
	// Wiz is the wiz provider block.
	// +optional
	Wiz *WizIntegration `json:"wiz,omitempty"`
	// AWS is the aws provider block.
	// +optional
	AWS *AWSIntegration `json:"aws,omitempty"`
	// Azure is the azure provider block.
	// +optional
	Azure *AzureIntegration `json:"azure,omitempty"`
	// Generic is the generic provider block.
	// +optional
	Generic *GenericIntegration `json:"generic,omitempty"`
}

IntegrationSpec configures one external system. Exactly the provider block matching spec.provider must be set (CEL-enforced) — integrations are strongly typed; the generic provider is the deliberate escape hatch, typed around patchy's own HTTP contract rather than a vendor's. +kubebuilder:validation:XValidation:rule="(self.provider == 'github') == has(self.github) && (self.provider == 'google-cloud') == has(self.googleCloud) && (self.provider == 'wiz') == has(self.wiz) && (self.provider == 'aws') == has(self.aws) && (self.provider == 'azure') == has(self.azure) && (self.provider == 'generic') == has(self.generic)",message="exactly the provider block matching spec.provider must be set" +kubebuilder:validation:XValidation:rule="!(self.provider in ['github', 'wiz', 'generic']) || has(self.secretRef)",message="spec.secretRef is required for the github, wiz, and generic providers"

func (*IntegrationSpec) DeepCopy

func (in *IntegrationSpec) DeepCopy() *IntegrationSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationSpec.

func (*IntegrationSpec) DeepCopyInto

func (in *IntegrationSpec) DeepCopyInto(out *IntegrationSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IntegrationStatus

type IntegrationStatus struct {
	// Conditions of the integration (Ready: credential valid, system
	// reachable).
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	// ObservedGeneration is the last spec generation acted on.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// WebhookPath is the receiver path deliveries must target
	// (e.g. /github/webhooks).
	// +optional
	WebhookPath string `json:"webhookPath,omitempty"`
	// Installations summarizes the App installations.
	// +optional
	Installations []InstallationSummary `json:"installations,omitempty"`
	// LastEventAt is when the receiver last accepted a delivery.
	// +optional
	LastEventAt *metav1.Time `json:"lastEventAt,omitempty"`
	// RateLimit is the last observed API quota.
	// +optional
	RateLimit *RateLimitStatus `json:"rateLimit,omitempty"`
	// Redelivery reports the last failed-delivery sweep.
	// +optional
	Redelivery *RedeliveryStatus `json:"redelivery,omitempty"`
	// Backfill reports the last manual alert backfill.
	// +optional
	Backfill *BackfillStatus `json:"backfill,omitempty"`
	// ResetAt echoes spec.reset.at once the receiver's dedup window has
	// been dropped; a spec.reset newer than this triggers another drop.
	// +optional
	ResetAt *metav1.Time `json:"resetAt,omitempty"`
}

IntegrationStatus is the integration's observed state.

func (*IntegrationStatus) DeepCopy

func (in *IntegrationStatus) DeepCopy() *IntegrationStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationStatus.

func (*IntegrationStatus) DeepCopyInto

func (in *IntegrationStatus) DeepCopyInto(out *IntegrationStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Investigation

type Investigation struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec InvestigationSpec `json:"spec"`
	// +optional
	Status InvestigationStatus `json:"status,omitempty"`
}

Investigation is one analysis attempt on a Finding: an agent job assessing exploitability, likelihood, and impact, and recommending remediate/ignore/manual. One immutable object per attempt, owned by the Finding.

func (*Investigation) DeepCopy

func (in *Investigation) DeepCopy() *Investigation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Investigation.

func (*Investigation) DeepCopyInto

func (in *Investigation) DeepCopyInto(out *Investigation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Investigation) DeepCopyObject

func (in *Investigation) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type InvestigationList

type InvestigationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Investigation `json:"items"`
}

InvestigationList contains a list of Investigation.

func (*InvestigationList) DeepCopy

func (in *InvestigationList) DeepCopy() *InvestigationList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InvestigationList.

func (*InvestigationList) DeepCopyInto

func (in *InvestigationList) DeepCopyInto(out *InvestigationList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*InvestigationList) DeepCopyObject

func (in *InvestigationList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type InvestigationSpec

type InvestigationSpec struct {
	// FindingRef is the owning Finding (UID-pinned).
	FindingRef ObjectReference `json:"findingRef"`
	// Attempt ordinal, 1-based.
	// +kubebuilder:validation:Minimum=1
	Attempt int32 `json:"attempt"`
	// RepositoryRef names the Repository artifact the agent works from; nil
	// for repository-less findings.
	// +optional
	RepositoryRef *LocalObjectReference `json:"repositoryRef,omitempty"`
	// Parameters bound this run (clamped controller-side).
	// +optional
	Parameters AgentParameters `json:"parameters,omitempty"`
}

InvestigationSpec identifies one analysis attempt. It is immutable — a new attempt is a new Investigation (CEL-enforced). +kubebuilder:validation:XValidation:rule="self == oldSelf",message="spec is immutable; create a new Investigation for a new attempt"

func (*InvestigationSpec) DeepCopy

func (in *InvestigationSpec) DeepCopy() *InvestigationSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InvestigationSpec.

func (*InvestigationSpec) DeepCopyInto

func (in *InvestigationSpec) DeepCopyInto(out *InvestigationSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type InvestigationStatus

type InvestigationStatus struct {
	// Phase of the run.
	// +optional
	Phase RunPhase `json:"phase,omitempty"`
	// JobRef locates the agent Job in the agents namespace.
	// +optional
	JobRef *JobReference `json:"jobRef,omitempty"`
	// Stage is the agent accounting for the run.
	// +optional
	Stage *StageResult `json:"stage,omitempty"`
	// Exploitability analysis: can the vulnerability actually be exercised?
	// +optional
	Exploitability *Analysis `json:"exploitability,omitempty"`
	// Likelihood analysis: how probable is exploitation in this deployment?
	// +optional
	Likelihood *Analysis `json:"likelihood,omitempty"`
	// Impact analysis: what is the blast radius if exploited?
	// +optional
	Impact *Analysis `json:"impact,omitempty"`
	// Recommendation is the verdict.
	// +optional
	Recommendation Recommendation `json:"recommendation,omitempty"`
	// Confidence decimal string in [0, 1].
	// +optional
	// +kubebuilder:validation:Pattern=`^(0(\.[0-9]{1,4})?|1(\.0{1,4})?)$`
	Confidence string `json:"confidence,omitempty"`
	// Severity as assessed by the agent (may differ from the scanner's).
	// +optional
	Severity Level `json:"severity,omitempty"`
	// Priority as assessed by the agent (display; scheduling priority is
	// computed controller-side).
	// +optional
	Priority Level `json:"priority,omitempty"`
	// AwaitApproval marks an approval hold: remediation waits for a human.
	// HoldReasons says why.
	// +optional
	AwaitApproval bool `json:"awaitApproval,omitempty"`
	// HoldReasons enumerates every reason the hold fired. Empty when
	// AwaitApproval is false.
	// +optional
	// +listType=set
	HoldReasons []HoldReason `json:"holdReasons,omitempty"`
	// RemediationParameters are the stage-2 parameters the investigation
	// suggested: the model to run, and (on Estimate) its prediction of the
	// turns and tokens the fix will need. The prediction is advisory — the
	// grant is resolved by the remediation spawner, never here.
	// +optional
	RemediationParameters *AgentParameters `json:"remediationParameters,omitempty"`
	// Report is the full analysis report markdown (single copy — the Finding
	// mirrors ratings only).
	// +optional
	// +kubebuilder:validation:MaxLength=65536
	Report string `json:"report,omitempty"`
	// Conditions of the run (Complete, RolledUp*).
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	// ObservedGeneration is the last spec generation acted on.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

InvestigationStatus records the analysis results. Written only by investigation-controller.

func (*InvestigationStatus) DeepCopy

func (in *InvestigationStatus) DeepCopy() *InvestigationStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InvestigationStatus.

func (*InvestigationStatus) DeepCopyInto

func (in *InvestigationStatus) DeepCopyInto(out *InvestigationStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type InvestigationSummary

type InvestigationSummary struct {
	// Name of the Investigation child.
	Name string `json:"name"`
	// Attempt ordinal.
	Attempt int32 `json:"attempt"`
	// Outcome of the stage (envelope vocabulary).
	// +optional
	Outcome string `json:"outcome,omitempty"`
	// Recommendation verdict.
	// +optional
	Recommendation Recommendation `json:"recommendation,omitempty"`
	// Confidence decimal string in [0, 1].
	// +optional
	// +kubebuilder:validation:Pattern=`^(0(\.[0-9]{1,4})?|1(\.0{1,4})?)$`
	Confidence string `json:"confidence,omitempty"`
	// Exploitability rating.
	// +optional
	Exploitability Rating `json:"exploitability,omitempty"`
	// Likelihood rating.
	// +optional
	Likelihood Rating `json:"likelihood,omitempty"`
	// Impact rating.
	// +optional
	Impact Rating `json:"impact,omitempty"`
	// AwaitApproval marks an approval hold; HoldReasons says why.
	// +optional
	AwaitApproval bool `json:"awaitApproval,omitempty"`
	// HoldReasons enumerates every reason the hold fired.
	// +optional
	// +listType=set
	HoldReasons []HoldReason `json:"holdReasons,omitempty"`
	// Estimate the investigation made for the remediation, mirrored here so
	// the approving human can see what they are authorizing.
	// +optional
	Estimate *AgentEstimate `json:"estimate,omitempty"`
	// CompletedAt is when the investigation finished.
	// +optional
	CompletedAt *metav1.Time `json:"completedAt,omitempty"`
}

InvestigationSummary mirrors the latest Investigation child onto the Finding so the UI list view needs only a Finding watch. Reports and per-dimension summaries live on the child only.

func (*InvestigationSummary) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InvestigationSummary.

func (*InvestigationSummary) DeepCopyInto

func (in *InvestigationSummary) DeepCopyInto(out *InvestigationSummary)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JobReference

type JobReference struct {
	// Namespace the Job runs in.
	Namespace string `json:"namespace"`
	// Name of the Job.
	Name string `json:"name"`
	// UID of the Job.
	// +optional
	UID types.UID `json:"uid,omitempty"`
}

JobReference locates an agent Job. Jobs live in the agents namespace, not the resource's own, so the namespace is explicit.

func (*JobReference) DeepCopy

func (in *JobReference) DeepCopy() *JobReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobReference.

func (*JobReference) DeepCopyInto

func (in *JobReference) DeepCopyInto(out *JobReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Level

type Level string

Level grades severity and priority. +kubebuilder:validation:Enum=low;medium;high;critical

const (
	LevelLow      Level = "low"
	LevelMedium   Level = "medium"
	LevelHigh     Level = "high"
	LevelCritical Level = "critical"
)

Severity/priority levels, lowest first.

type LocalObjectReference

type LocalObjectReference struct {
	// Name of the referent.
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`
}

LocalObjectReference names an object of a known kind in the same namespace.

func (*LocalObjectReference) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalObjectReference.

func (*LocalObjectReference) DeepCopyInto

func (in *LocalObjectReference) DeepCopyInto(out *LocalObjectReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LocalSecretReference

type LocalSecretReference struct {
	// Name of the Secret.
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`
}

LocalSecretReference names a Secret in the same namespace as the referring object.

func (*LocalSecretReference) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalSecretReference.

func (*LocalSecretReference) DeepCopyInto

func (in *LocalSecretReference) DeepCopyInto(out *LocalSecretReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Location

type Location struct {
	// Path of the file, repo-relative.
	Path string `json:"path"`
	// StartLine of the flagged region (1-based).
	// +optional
	StartLine int32 `json:"startLine,omitempty"`
	// EndLine of the flagged region.
	// +optional
	EndLine int32 `json:"endLine,omitempty"`
	// Snippet is the flagged source excerpt.
	// +optional
	// +kubebuilder:validation:MaxLength=1024
	Snippet string `json:"snippet,omitempty"`
}

Location is one source location an alert points at.

func (*Location) DeepCopy

func (in *Location) DeepCopy() *Location

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Location.

func (*Location) DeepCopyInto

func (in *Location) DeepCopyInto(out *Location)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MonthlyBucket

type MonthlyBucket struct {
	// Findings completed in the month.
	// +optional
	Findings int64 `json:"findings,omitempty"`
	// Runs executed in the month.
	// +optional
	Runs int64 `json:"runs,omitempty"`
	// CostMicroUSD spent in the month.
	// +optional
	CostMicroUSD int64 `json:"costMicroUSD,omitempty"`
}

MonthlyBucket is the slim global trend line (total scope only; ~150 bytes per month). Deleted findings cannot be re-bucketed later, so this is written at rollup time.

func (*MonthlyBucket) DeepCopy

func (in *MonthlyBucket) DeepCopy() *MonthlyBucket

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonthlyBucket.

func (*MonthlyBucket) DeepCopyInto

func (in *MonthlyBucket) DeepCopyInto(out *MonthlyBucket)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ObjectReference

type ObjectReference struct {
	// Name of the referent.
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`
	// UID of the referent at the time the reference was written.
	// +optional
	UID types.UID `json:"uid,omitempty"`
}

ObjectReference names an object in the same namespace and pins its UID, so a reference never silently rebinds to a recreated namesake (Finding names are deterministic and reused across TTL cycles).

func (*ObjectReference) DeepCopy

func (in *ObjectReference) DeepCopy() *ObjectReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference.

func (*ObjectReference) DeepCopyInto

func (in *ObjectReference) DeepCopyInto(out *ObjectReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Phase

type Phase string

Phase is the Finding lifecycle state. Queued is a real phase — remediation runs in priority order with bounded concurrency, so findings observably wait for a slot. +kubebuilder:validation:Enum=Opened;Enhanced;Investigating;Queued;AwaitingApproval;Remediating;InReview;Remediated;Failed;Dismissed;HandedOff

const (
	PhaseOpened           Phase = "Opened"
	PhaseEnhanced         Phase = "Enhanced"
	PhaseInvestigating    Phase = "Investigating"
	PhaseQueued           Phase = "Queued"
	PhaseAwaitingApproval Phase = "AwaitingApproval"
	PhaseRemediating      Phase = "Remediating"
	PhaseInReview         Phase = "InReview"
	PhaseRemediated       Phase = "Remediated"
	PhaseFailed           Phase = "Failed"
	PhaseDismissed        Phase = "Dismissed"
	PhaseHandedOff        Phase = "HandedOff"
)

Finding phases.

func RetryTarget added in v0.5.2

func RetryTarget(f *Finding) Phase

RetryTarget returns the phase a Failed finding recovers to when a human retries it — the recoverable state immediately before the failure — or "" when the finding is not Failed or its history holds no retryable phase. The failed stage is re-attempted by the normal machinery from there: the investigation gate opens a fresh attempt from Enhanced, the remediation spawner from Queued.

type PhaseTime

type PhaseTime struct {
	// Phase entered.
	Phase Phase `json:"phase"`
	// At is the entry time.
	At metav1.Time `json:"at"`
}

PhaseTime records when the finding entered a phase (append-only).

func (*PhaseTime) DeepCopy

func (in *PhaseTime) DeepCopy() *PhaseTime

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhaseTime.

func (*PhaseTime) DeepCopyInto

func (in *PhaseTime) DeepCopyInto(out *PhaseTime)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProxyConfig added in v0.11.2

type ProxyConfig struct {
	// URL of the proxy, e.g. "http://proxy.corp.example:3128". Schemes http
	// and https. Credentials must not be embedded in the URL — put them in
	// the credential Secret under "proxyUsername" + "proxyPassword".
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:Pattern=`^https?://[^@\s]+$`
	URL string `json:"url"`
}

ProxyConfig routes the referencing resource's GitHub traffic through an HTTP/HTTPS forward proxy — the GitHub Enterprise Cloud IP-allowlist pattern. When set it overrides the process HTTPS_PROXY/HTTP_PROXY/NO_PROXY environment for this resource's traffic; unset, the environment applies.

func (*ProxyConfig) DeepCopy added in v0.11.2

func (in *ProxyConfig) DeepCopy() *ProxyConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyConfig.

func (*ProxyConfig) DeepCopyInto added in v0.11.2

func (in *ProxyConfig) DeepCopyInto(out *ProxyConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PullRequestRef

type PullRequestRef struct {
	// Number of the pull request.
	Number int64 `json:"number"`
	// URL of the pull request.
	// +optional
	URL string `json:"url,omitempty"`
}

PullRequestRef is the opened pull request. Its lifecycle (merge/close) lives on the Finding — this object is immutable history after completion.

func (*PullRequestRef) DeepCopy

func (in *PullRequestRef) DeepCopy() *PullRequestRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PullRequestRef.

func (*PullRequestRef) DeepCopyInto

func (in *PullRequestRef) DeepCopyInto(out *PullRequestRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PullRequestStatus

type PullRequestStatus struct {
	// Number of the pull request.
	Number int64 `json:"number"`
	// URL of the pull request.
	// +optional
	URL string `json:"url,omitempty"`
	// State of the pull request.
	// +optional
	// +kubebuilder:validation:Enum=open;merged;closed
	State string `json:"state,omitempty"`
	// MergedAt is when the pull request merged.
	// +optional
	MergedAt *metav1.Time `json:"mergedAt,omitempty"`
}

PullRequestStatus is the lifecycle of the remediation pull request. remediation-controller writes number/url at open; integration-controller owns state/mergedAt from PR webhooks.

func (*PullRequestStatus) DeepCopy

func (in *PullRequestStatus) DeepCopy() *PullRequestStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PullRequestStatus.

func (*PullRequestStatus) DeepCopyInto

func (in *PullRequestStatus) DeepCopyInto(out *PullRequestStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RateLimitStatus

type RateLimitStatus struct {
	// Remaining requests in the current window.
	Remaining int32 `json:"remaining"`
	// ResetAt is when the window resets.
	// +optional
	ResetAt *metav1.Time `json:"resetAt,omitempty"`
}

RateLimitStatus is an observability snapshot of the provider API quota.

func (*RateLimitStatus) DeepCopy

func (in *RateLimitStatus) DeepCopy() *RateLimitStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitStatus.

func (*RateLimitStatus) DeepCopyInto

func (in *RateLimitStatus) DeepCopyInto(out *RateLimitStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Rating

type Rating string

Rating grades one investigation analysis dimension (exploitability, likelihood, impact). RatingNone is an assessed "not applicable / no risk"; the empty string means the dimension was not assessed. +kubebuilder:validation:Enum=none;low;medium;high;critical

const (
	RatingNone     Rating = "none"
	RatingLow      Rating = "low"
	RatingMedium   Rating = "medium"
	RatingHigh     Rating = "high"
	RatingCritical Rating = "critical"
)

Analysis ratings.

type Recommendation

type Recommendation string

Recommendation is the investigation verdict. +kubebuilder:validation:Enum=remediate;ignore;manual

const (
	RecommendationRemediate Recommendation = "remediate"
	RecommendationIgnore    Recommendation = "ignore"
	RecommendationManual    Recommendation = "manual"
)

Investigation verdicts.

type RedeliveryStatus added in v0.5.4

type RedeliveryStatus struct {
	// LastSweepAt is when the last sweep ran.
	// +optional
	LastSweepAt *metav1.Time `json:"lastSweepAt,omitempty"`
	// Scanned counts the delivery attempts the last sweep inspected.
	// +optional
	Scanned int32 `json:"scanned,omitempty"`
	// Redelivered counts the redeliveries the last sweep requested.
	// +optional
	Redelivered int32 `json:"redelivered,omitempty"`
	// Truncated marks a sweep that hit the page cap before reaching the
	// lookback horizon; the oldest part of the window went unscanned.
	// +optional
	Truncated bool `json:"truncated,omitempty"`
	// Error carries the last sweep failure; empty when the sweep succeeded.
	// +optional
	Error string `json:"error,omitempty"`
	// ReplayedAt echoes spec.replay.at once that replay has run; a
	// spec.replay newer than this triggers another full replay.
	// +optional
	ReplayedAt *metav1.Time `json:"replayedAt,omitempty"`
}

RedeliveryStatus reports the last failed-delivery sweep.

func (*RedeliveryStatus) DeepCopy added in v0.5.4

func (in *RedeliveryStatus) DeepCopy() *RedeliveryStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedeliveryStatus.

func (*RedeliveryStatus) DeepCopyInto added in v0.5.4

func (in *RedeliveryStatus) DeepCopyInto(out *RedeliveryStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RelatedFinding

type RelatedFinding struct {
	// From is the edge's source Finding name.
	From string `json:"from"`
	// To is the edge's target Finding name.
	To string `json:"to"`
	// Relationship classifies the edge.
	Relationship RelationshipType `json:"relationship"`
}

RelatedFinding is a directed edge between two findings, stored identically on both endpoints (one of from/to is the holder's own name). Names may dangle after the other endpoint's TTL deletion — consumers tolerate that.

func (*RelatedFinding) DeepCopy

func (in *RelatedFinding) DeepCopy() *RelatedFinding

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RelatedFinding.

func (*RelatedFinding) DeepCopyInto

func (in *RelatedFinding) DeepCopyInto(out *RelatedFinding)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RelationshipType

type RelationshipType string

RelationshipType classifies an edge between two findings. +kubebuilder:validation:Enum=duplicate-of;successor-of;related-to

const (
	// RelationshipDuplicateOf: From was merged into To and deleted.
	RelationshipDuplicateOf RelationshipType = "duplicate-of"
	// RelationshipSuccessorOf: From is the next accumulation generation of To.
	RelationshipSuccessorOf RelationshipType = "successor-of"
	// RelationshipRelatedTo is a free-form association (human- or
	// machine-written).
	RelationshipRelatedTo RelationshipType = "related-to"
)

Finding relationships.

type Remediation

type Remediation struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec RemediationSpec `json:"spec"`
	// +optional
	Status RemediationStatus `json:"status,omitempty"`
}

Remediation is one remediation attempt on a Finding: an agent job that implements the fix the referenced Investigation recommended, whose changeset is pushed as a branch and opened as a pull request. One immutable object per attempt, owned by the Finding; the changeset itself never appears here.

func (*Remediation) DeepCopy

func (in *Remediation) DeepCopy() *Remediation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Remediation.

func (*Remediation) DeepCopyInto

func (in *Remediation) DeepCopyInto(out *Remediation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Remediation) DeepCopyObject

func (in *Remediation) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RemediationList

type RemediationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Remediation `json:"items"`
}

RemediationList contains a list of Remediation.

func (*RemediationList) DeepCopy

func (in *RemediationList) DeepCopy() *RemediationList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemediationList.

func (*RemediationList) DeepCopyInto

func (in *RemediationList) DeepCopyInto(out *RemediationList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RemediationList) DeepCopyObject

func (in *RemediationList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RemediationSpec

type RemediationSpec struct {
	// FindingRef is the owning Finding (UID-pinned).
	FindingRef ObjectReference `json:"findingRef"`
	// InvestigationRef is the analysis this run executes.
	InvestigationRef ObjectReference `json:"investigationRef"`
	// RepositoryRef names the Repository artifact the agent works from (the
	// same SHA-pinned tree the investigation analysed).
	RepositoryRef LocalObjectReference `json:"repositoryRef"`
	// Attempt ordinal, 1-based.
	// +kubebuilder:validation:Minimum=1
	Attempt int32 `json:"attempt"`
	// Priority is the scheduling priority (0–100) computed from the
	// investigation results; the scheduler grants slots to the highest
	// pending priority first.
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=100
	Priority int32 `json:"priority"`
	// Parameters bound this run (clamped controller-side).
	// +optional
	Parameters AgentParameters `json:"parameters,omitempty"`
	// ApprovedBy is the human whose approval caused this run, when it exists
	// because of one.
	// +optional
	ApprovedBy string `json:"approvedBy,omitempty"`
	// Revival marks a remediate-only run reviving a handed-off finding.
	// +optional
	Revival bool `json:"revival,omitempty"`
}

RemediationSpec identifies one remediation attempt. It is immutable — a new attempt is a new Remediation (CEL-enforced). +kubebuilder:validation:XValidation:rule="self == oldSelf",message="spec is immutable; create a new Remediation for a new attempt"

func (*RemediationSpec) DeepCopy

func (in *RemediationSpec) DeepCopy() *RemediationSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemediationSpec.

func (*RemediationSpec) DeepCopyInto

func (in *RemediationSpec) DeepCopyInto(out *RemediationSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RemediationStatus

type RemediationStatus struct {
	// Phase of the run. Pending runs wait in the priority queue; the
	// scheduler's grant sets Running.
	// +optional
	Phase RunPhase `json:"phase,omitempty"`
	// GrantedAt is when the scheduler granted the run its slot.
	// +optional
	GrantedAt *metav1.Time `json:"grantedAt,omitempty"`
	// JobRef locates the agent Job in the agents namespace.
	// +optional
	JobRef *JobReference `json:"jobRef,omitempty"`
	// Stage is the agent accounting for the run.
	// +optional
	Stage *StageResult `json:"stage,omitempty"`
	// Success reports whether the agent produced a fix.
	// +optional
	Success bool `json:"success,omitempty"`
	// Confidence decimal string in [0, 1].
	// +optional
	// +kubebuilder:validation:Pattern=`^(0(\.[0-9]{1,4})?|1(\.0{1,4})?)$`
	Confidence string `json:"confidence,omitempty"`
	// Branch carrying the pushed fix.
	// +optional
	Branch string `json:"branch,omitempty"`
	// PushedCommit is the SHA of the pushed commit.
	// +optional
	PushedCommit string `json:"pushedCommit,omitempty"`
	// PullRequest opened for the fix.
	// +optional
	PullRequest *PullRequestRef `json:"pullRequest,omitempty"`
	// Report is the full remediation report markdown.
	// +optional
	// +kubebuilder:validation:MaxLength=65536
	Report string `json:"report,omitempty"`
	// Conditions of the run (Complete, RolledUp*).
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	// ObservedGeneration is the last spec generation acted on.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

RemediationStatus records the remediation results. Written only by remediation-controller.

func (*RemediationStatus) DeepCopy

func (in *RemediationStatus) DeepCopy() *RemediationStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemediationStatus.

func (*RemediationStatus) DeepCopyInto

func (in *RemediationStatus) DeepCopyInto(out *RemediationStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RemediationSummary

type RemediationSummary struct {
	// Name of the Remediation child.
	Name string `json:"name"`
	// Attempt ordinal.
	Attempt int32 `json:"attempt"`
	// Outcome of the stage (envelope vocabulary).
	// +optional
	Outcome string `json:"outcome,omitempty"`
	// Success reports whether the agent produced a fix.
	// +optional
	Success bool `json:"success,omitempty"`
	// Branch carrying the fix.
	// +optional
	Branch string `json:"branch,omitempty"`
	// CompletedAt is when the remediation finished.
	// +optional
	CompletedAt *metav1.Time `json:"completedAt,omitempty"`
}

RemediationSummary mirrors the latest Remediation child onto the Finding.

func (*RemediationSummary) DeepCopy

func (in *RemediationSummary) DeepCopy() *RemediationSummary

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemediationSummary.

func (*RemediationSummary) DeepCopyInto

func (in *RemediationSummary) DeepCopyInto(out *RemediationSummary)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Repository

type Repository struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec RepositorySpec `json:"spec"`
	// +optional
	Status RepositoryStatus `json:"status,omitempty"`
}

Repository is a SHA-pinned clone artifact: source-controller clones the repository with Forge credentials and serves it as a tarball that agent jobs fetch credential-lessly. Owned by a Finding and garbage-collected with it.

func (*Repository) DeepCopy

func (in *Repository) DeepCopy() *Repository

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Repository.

func (*Repository) DeepCopyInto

func (in *Repository) DeepCopyInto(out *Repository)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Repository) DeepCopyObject

func (in *Repository) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RepositoryList

type RepositoryList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Repository `json:"items"`
}

RepositoryList contains a list of Repository.

func (*RepositoryList) DeepCopy

func (in *RepositoryList) DeepCopy() *RepositoryList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryList.

func (*RepositoryList) DeepCopyInto

func (in *RepositoryList) DeepCopyInto(out *RepositoryList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RepositoryList) DeepCopyObject

func (in *RepositoryList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RepositoryRef

type RepositoryRef struct {
	// Branch to resolve; source-controller resolves it to a SHA exactly once
	// and pins status.resolvedSHA.
	// +optional
	Branch string `json:"branch,omitempty"`
}

RepositoryRef pins what to clone.

func (*RepositoryRef) DeepCopy

func (in *RepositoryRef) DeepCopy() *RepositoryRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryRef.

func (*RepositoryRef) DeepCopyInto

func (in *RepositoryRef) DeepCopyInto(out *RepositoryRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RepositorySpec

type RepositorySpec struct {
	// URL is the normalized https URL of the repository to clone.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="spec.url is immutable"
	URL string `json:"url"`
	// Ref selects what to clone.
	// +optional
	Ref RepositoryRef `json:"ref,omitempty"`
}

RepositorySpec asks source-controller to produce a SHA-pinned clone artifact of one repository.

func (*RepositorySpec) DeepCopy

func (in *RepositorySpec) DeepCopy() *RepositorySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositorySpec.

func (*RepositorySpec) DeepCopyInto

func (in *RepositorySpec) DeepCopyInto(out *RepositorySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RepositoryStatus

type RepositoryStatus struct {
	// Conditions of the repository (Ready: artifact available; Stalled:
	// cannot clone or artifact over the size cap).
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	// ObservedGeneration is the last spec generation acted on.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// ResolvedSHA is the commit the artifact is pinned to; investigation and
	// remediation both work this exact tree, and it is the push base.
	// +optional
	ResolvedSHA string `json:"resolvedSHA,omitempty"`
	// Forge names the Forge whose credentials cloned the repository.
	// +optional
	Forge *LocalObjectReference `json:"forge,omitempty"`
	// Artifact is the served tarball.
	// +optional
	Artifact *Artifact `json:"artifact,omitempty"`
}

RepositoryStatus is the repository artifact's observed state.

func (*RepositoryStatus) DeepCopy

func (in *RepositoryStatus) DeepCopy() *RepositoryStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryStatus.

func (*RepositoryStatus) DeepCopyInto

func (in *RepositoryStatus) DeepCopyInto(out *RepositoryStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RepositoryType

type RepositoryType string

RepositoryType identifies the forge family a repository lives on. +kubebuilder:validation:Enum=github

const (
	RepositoryTypeGitHub RepositoryType = "github"
)

Repository types.

type RollupBucket

type RollupBucket struct {
	// Findings counted (one per finding reaching a terminal phase, corrected
	// on revival).
	// +optional
	Findings int64 `json:"findings,omitempty"`
	// Phases histogram of terminal phases (remediated, failed, dismissed,
	// handedOff, deleted).
	// +optional
	Phases map[string]int64 `json:"phases,omitempty"`
	// Recommendations histogram of verdicts (remediate, ignore, manual).
	// +optional
	Recommendations map[string]int64 `json:"recommendations,omitempty"`
	// Attempts summed across findings.
	// +optional
	Attempts int64 `json:"attempts,omitempty"`
	// Stages aggregates per stage ("investigation", "remediation").
	// +optional
	Stages map[string]StageAggregate `json:"stages,omitempty"`
}

RollupBucket accumulates finding-level counters within a scope. Total and repository scopes carry everything; harness and model scopes carry only the stages aggregates (a finding has no single harness/model owner).

func (*RollupBucket) DeepCopy

func (in *RollupBucket) DeepCopy() *RollupBucket

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollupBucket.

func (*RollupBucket) DeepCopyInto

func (in *RollupBucket) DeepCopyInto(out *RollupBucket)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RollupScope

type RollupScope struct {
	// Type of the dimension.
	Type ScopeType `json:"type"`
	// Key is the dimension value ("" for total, "owner/repo", harness ID,
	// model ID). The sanitized form appears in labels; this field is truth.
	// +optional
	Key string `json:"key,omitempty"`
}

RollupScope identifies one dimension value. Rollups are sharded — one small object per scope value — because a single object holding a per-repo map would exceed etcd's object cap at estate scale (~15K repositories).

func (*RollupScope) DeepCopy

func (in *RollupScope) DeepCopy() *RollupScope

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollupScope.

func (*RollupScope) DeepCopyInto

func (in *RollupScope) DeepCopyInto(out *RollupScope)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RunKind

type RunKind string

RunKind discriminates the two agent run kinds. +kubebuilder:validation:Enum=investigation;remediation

const (
	RunKindInvestigation RunKind = "investigation"
	RunKindRemediation   RunKind = "remediation"
)

Agent run kinds.

type RunPhase

type RunPhase string

RunPhase is the lifecycle of one agent run (an Investigation or Remediation child). +kubebuilder:validation:Enum=Pending;Running;Complete;Failed

const (
	RunPending  RunPhase = "Pending"
	RunRunning  RunPhase = "Running"
	RunComplete RunPhase = "Complete"
	RunFailed   RunPhase = "Failed"
)

Agent run phases.

type ScopeType

type ScopeType string

ScopeType is a rollup dimension. +kubebuilder:validation:Enum=total;repository;harness;model

const (
	ScopeTotal      ScopeType = "total"
	ScopeRepository ScopeType = "repository"
	ScopeHarness    ScopeType = "harness"
	ScopeModel      ScopeType = "model"
)

Rollup scopes.

type StageAggregate

type StageAggregate struct {
	// Runs counted.
	// +optional
	Runs int64 `json:"runs,omitempty"`
	// Succeeded runs (outcome ok; for remediation, success=true).
	// +optional
	Succeeded int64 `json:"succeeded,omitempty"`
	// Outcomes histogram (envelope outcome vocabulary + "aborted").
	// +optional
	Outcomes map[string]int64 `json:"outcomes,omitempty"`
	// InputTokens summed.
	// +optional
	InputTokens int64 `json:"inputTokens,omitempty"`
	// OutputTokens summed.
	// +optional
	OutputTokens int64 `json:"outputTokens,omitempty"`
	// CacheReadTokens summed.
	// +optional
	CacheReadTokens int64 `json:"cacheReadTokens,omitempty"`
	// CacheCreationTokens summed.
	// +optional
	CacheCreationTokens int64 `json:"cacheCreationTokens,omitempty"`
	// CostMicroUSD summed (micro-USD, exact integer arithmetic).
	// +optional
	CostMicroUSD int64 `json:"costMicroUSD,omitempty"`
	// ElapsedMilliseconds summed.
	// +optional
	ElapsedMilliseconds int64 `json:"elapsedMilliseconds,omitempty"`
	// Turns summed across every run counted here.
	// +optional
	Turns int64 `json:"turns,omitempty"`
	// Estimate accumulates how well the investigation predicted this stage's
	// cost. Absent for the investigation stage, which estimates nothing.
	// +optional
	Estimate *EstimateAggregate `json:"estimate,omitempty"`
}

StageAggregate accumulates one stage's runs within a scope. Averages and rates are computed client-side from sum ÷ count — merge-idempotent and exact.

func (*StageAggregate) DeepCopy

func (in *StageAggregate) DeepCopy() *StageAggregate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StageAggregate.

func (*StageAggregate) DeepCopyInto

func (in *StageAggregate) DeepCopyInto(out *StageAggregate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StageResult

type StageResult struct {
	// Outcome is the envelope outcome vocabulary (ok, runtime_error, timeout,
	// budget_exceeded, report_missing, report_invalid, commit_failed,
	// changeset_too_large) plus "aborted" for a run killed with no envelope.
	Outcome string `json:"outcome"`
	// Harness that executed the stage.
	// +optional
	Harness string `json:"harness,omitempty"`
	// Model the stage ran on.
	// +optional
	Model string `json:"model,omitempty"`
	// SessionID of the harness session.
	// +optional
	SessionID string `json:"sessionID,omitempty"`
	// NumTurns the agent took.
	// +optional
	NumTurns int32 `json:"numTurns,omitempty"`
	// Usage accounting for the stage.
	// +optional
	Usage UsageSummary `json:"usage,omitempty"`
	// StartedAt is when the stage began.
	// +optional
	StartedAt *metav1.Time `json:"startedAt,omitempty"`
	// FinishedAt is when the stage ended.
	// +optional
	FinishedAt *metav1.Time `json:"finishedAt,omitempty"`
	// ElapsedMilliseconds is the stage's wall-clock duration.
	// +optional
	ElapsedMilliseconds int64 `json:"elapsedMilliseconds,omitempty"`
	// Detail explains a non-ok outcome for humans.
	// +optional
	// +kubebuilder:validation:MaxLength=4096
	Detail string `json:"detail,omitempty"`
	// Transcript points at the conversation this stage produced. The turns
	// themselves live in a ConfigMap owned by this run — far too large for a
	// status subresource — so what is recorded here is where to find them and
	// enough of a summary to render without fetching.
	// +optional
	Transcript *TranscriptRef `json:"transcript,omitempty"`
}

StageResult records how one agent stage ran, mirroring the agent envelope's stage block losslessly (sessionID is never truncated).

func (*StageResult) DeepCopy

func (in *StageResult) DeepCopy() *StageResult

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StageResult.

func (*StageResult) DeepCopyInto

func (in *StageResult) DeepCopyInto(out *StageResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TrackingStatus

type TrackingStatus struct {
	// Integration that owns the projection.
	Integration string `json:"integration"`
	// IssueNumber of the tracking item.
	// +optional
	IssueNumber int64 `json:"issueNumber,omitempty"`
	// URL of the tracking item.
	// +optional
	URL string `json:"url,omitempty"`
	// State of the tracking item (open/closed).
	// +optional
	State string `json:"state,omitempty"`
}

TrackingStatus links the finding to its projected tracking item.

func (*TrackingStatus) DeepCopy

func (in *TrackingStatus) DeepCopy() *TrackingStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrackingStatus.

func (*TrackingStatus) DeepCopyInto

func (in *TrackingStatus) DeepCopyInto(out *TrackingStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TranscriptRef added in v0.8.2

type TranscriptRef struct {
	// Name of the ConfigMap holding the turns, in the run's own namespace.
	Name string `json:"name"`
	// Turns is how many the transcript holds.
	// +optional
	Turns int32 `json:"turns,omitempty"`
	// Truncated reports that recording bounds cut the conversation short, so
	// readers know the record is partial rather than complete.
	// +optional
	Truncated bool `json:"truncated,omitempty"`
}

TranscriptRef locates one agent run's captured conversation. The ConfigMap is owned by the run that produced it, which is in turn owned by its Finding: deleting the Finding on TTL cascades to both, so a transcript is retained exactly as long as the finding it explains.

func (*TranscriptRef) DeepCopy added in v0.8.2

func (in *TranscriptRef) DeepCopy() *TranscriptRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TranscriptRef.

func (*TranscriptRef) DeepCopyInto added in v0.8.2

func (in *TranscriptRef) DeepCopyInto(out *TranscriptRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UnitFailureReason added in v0.9.3

type UnitFailureReason string

UnitFailureReason names why an EvaluationUnit settled Failed without a trusted result. The client maps HarnessUnavailable to a skip and WorkspaceLost to a re-upload-and-resubmit prompt. +kubebuilder:validation:Enum=WorkspaceLost;HarnessUnavailable;JobFailed;Aborted;ResultTooLarge

const (
	// UnitWorkspaceLost: the workspace bundle is no longer in the artifact
	// store (retention sweep); re-upload and resubmit.
	UnitWorkspaceLost UnitFailureReason = "WorkspaceLost"
	// UnitHarnessUnavailable: no harness in the unit's preference list is
	// enabled in the runner fleet.
	UnitHarnessUnavailable UnitFailureReason = "HarnessUnavailable"
	// UnitJobFailed: the agent Job died without emitting a result event.
	UnitJobFailed UnitFailureReason = "JobFailed"
	// UnitAborted: the evaluation was cancelled while the unit ran.
	UnitAborted UnitFailureReason = "Aborted"
	// UnitResultTooLarge: the pod's result payload exceeded the wire bound
	// and could not be stored.
	UnitResultTooLarge UnitFailureReason = "ResultTooLarge"
)

Unit failure reasons.

type UnitPlan added in v0.9.3

type UnitPlan struct {
	// Skill under evaluation.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=256
	Skill string `json:"skill"`
	// Tier of the run: 1 = triggers, 2 = evals.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=2
	Tier int32 `json:"tier"`
	// Model is the canonical provider-qualified model id the unit evaluates
	// (e.g. "anthropic/claude-sonnet-5").
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=256
	Model string `json:"model"`
	// Harnesses that can run the model, in preference order. A unit whose
	// options are all disabled in the fleet settles as
	// Failed/HarnessUnavailable.
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=8
	Harnesses []HarnessOption `json:"harnesses"`
	// Workspace bundle the unit runs against.
	Workspace WorkspaceRef `json:"workspace"`
	// TimeoutMilliseconds bounds the unit's wall clock (the Job deadline
	// clamps it controller-side).
	// +optional
	// +kubebuilder:validation:Minimum=0
	TimeoutMilliseconds int64 `json:"timeoutMilliseconds,omitempty"`
	// MaxTurns granted per agent run inside the unit.
	// +optional
	// +kubebuilder:validation:Minimum=0
	MaxTurns int32 `json:"maxTurns,omitempty"`
	// RunsPerQuery repeats each case this many times (tier 1).
	// +optional
	// +kubebuilder:validation:Minimum=0
	RunsPerQuery int32 `json:"runsPerQuery,omitempty"`
	// JudgeModel is the provider-qualified model the in-pod LLM judge runs
	// on; empty for no judge.
	// +optional
	// +kubebuilder:validation:MaxLength=256
	JudgeModel string `json:"judgeModel,omitempty"`
	// ExecJSON is the serialized remainder of the client's unit spec (cases
	// allowlist, prior results entry, client version, …), handed to the pod
	// verbatim. Opaque to patchy.
	// +optional
	// +kubebuilder:validation:MaxLength=131072
	ExecJSON string `json:"execJSON,omitempty"`
}

UnitPlan is one evaluation unit: a skill evaluated on one model at one tier. The fields patchy schedules on (harness selection, workspace, timeout) are typed; everything else the in-pod client needs travels opaquely in ExecJSON — patchy never learns evaluation semantics.

func (*UnitPlan) DeepCopy added in v0.9.3

func (in *UnitPlan) DeepCopy() *UnitPlan

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnitPlan.

func (*UnitPlan) DeepCopyInto added in v0.9.3

func (in *UnitPlan) DeepCopyInto(out *UnitPlan)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UsageSummary

type UsageSummary struct {
	// InputTokens consumed.
	// +optional
	InputTokens int64 `json:"inputTokens,omitempty"`
	// OutputTokens produced.
	// +optional
	OutputTokens int64 `json:"outputTokens,omitempty"`
	// CacheReadTokens read from prompt cache.
	// +optional
	CacheReadTokens int64 `json:"cacheReadTokens,omitempty"`
	// CacheCreationTokens written to prompt cache.
	// +optional
	CacheCreationTokens int64 `json:"cacheCreationTokens,omitempty"`
	// CostUSD is the harness-reported cost as a decimal string (structural
	// schemas forbid floats).
	// +optional
	// +kubebuilder:validation:Pattern=`^[0-9]+(\.[0-9]{1,6})?$`
	CostUSD string `json:"costUSD,omitempty"`
}

UsageSummary is one agent run's token and cost accounting. Zeroes mean the harness did not report the figure.

func (*UsageSummary) DeepCopy

func (in *UsageSummary) DeepCopy() *UsageSummary

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UsageSummary.

func (*UsageSummary) DeepCopyInto

func (in *UsageSummary) DeepCopyInto(out *UsageSummary)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WizAPI added in v0.9.0

type WizAPI struct {
	// Endpoint is the tenant GraphQL endpoint, e.g.
	// https://api.eu1.app.wiz.io/graphql.
	// +kubebuilder:validation:MinLength=1
	Endpoint string `json:"endpoint"`
	// TokenURL is the OAuth2 client-credentials token endpoint; empty means
	// https://auth.app.wiz.io/oauth/token.
	// +optional
	TokenURL string `json:"tokenURL,omitempty"`
}

WizAPI configures the Wiz GraphQL API client used for write-back: on a dismissed finding the originating Wiz issue is rejected with a note. The block is optional — without it Wiz ingestion is one-way, exactly like SCC. Credentials are the Wiz service-account keys "clientId" + "clientSecret" in the integration's credential Secret.

func (*WizAPI) DeepCopy added in v0.9.0

func (in *WizAPI) DeepCopy() *WizAPI

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WizAPI.

func (*WizAPI) DeepCopyInto added in v0.9.0

func (in *WizAPI) DeepCopyInto(out *WizAPI)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WizDefend added in v0.9.0

type WizDefend struct {
	// Enabled turns the Wiz Defend ingestion capability on.
	Enabled bool `json:"enabled"`
	// MinSeverity drops detections below this severity before they become
	// findings.
	// +optional
	// +kubebuilder:default=low
	MinSeverity Level `json:"minSeverity,omitempty"`
}

WizDefend configures ingestion of Wiz Defend threat detections, delivered by a Wiz automation-rule webhook using the documented body template.

func (*WizDefend) DeepCopy added in v0.9.0

func (in *WizDefend) DeepCopy() *WizDefend

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WizDefend.

func (*WizDefend) DeepCopyInto added in v0.9.0

func (in *WizDefend) DeepCopyInto(out *WizDefend)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WizIntegration added in v0.9.0

type WizIntegration struct {
	// Issues enables Wiz Issues ingestion.
	// +optional
	Issues *WizIssues `json:"issues,omitempty"`
	// Defend enables Wiz Defend threat-detection ingestion.
	// +optional
	Defend *WizDefend `json:"defend,omitempty"`
	// API enables write-back through the Wiz GraphQL API.
	// +optional
	API *WizAPI `json:"api,omitempty"`
}

WizIntegration is the wiz provider block. Inbound deliveries carry the shared bearer token stored under key "webhookToken" in the credential Secret — a Wiz automation action sends a static header and cannot compute an HMAC over the body. Issues and Defend are independent capabilities that share the /wiz/webhooks path; the receiver discriminates by payload shape.

func (*WizIntegration) DeepCopy added in v0.9.0

func (in *WizIntegration) DeepCopy() *WizIntegration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WizIntegration.

func (*WizIntegration) DeepCopyInto added in v0.9.0

func (in *WizIntegration) DeepCopyInto(out *WizIntegration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WizIssues added in v0.9.0

type WizIssues struct {
	// Enabled turns the Wiz Issues ingestion capability on.
	Enabled bool `json:"enabled"`
	// MinSeverity drops issues below this severity before they become
	// findings. Wiz INFORMATIONAL ranks below low, so the default floor
	// drops it.
	// +optional
	// +kubebuilder:default=low
	MinSeverity Level `json:"minSeverity,omitempty"`
}

WizIssues configures ingestion of Wiz Issues — cloud misconfigurations and toxic combinations — delivered by a Wiz automation-rule webhook. The rule's action body must follow the template documented in docs/integrations/wiz.md; that template is the payload contract.

func (*WizIssues) DeepCopy added in v0.9.0

func (in *WizIssues) DeepCopy() *WizIssues

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WizIssues.

func (*WizIssues) DeepCopyInto added in v0.9.0

func (in *WizIssues) DeepCopyInto(out *WizIssues)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WorkspaceRef added in v0.9.3

type WorkspaceRef struct {
	// Digest is the hex sha256 of the gzip tarball.
	// +kubebuilder:validation:Pattern=`^[0-9a-f]{64}$`
	Digest string `json:"digest"`
	// SizeBytes of the tarball, as uploaded.
	// +optional
	// +kubebuilder:validation:Minimum=0
	SizeBytes int64 `json:"sizeBytes,omitempty"`
}

WorkspaceRef names a content-addressed workspace bundle by its sha256 digest. The digest is both identity and fetch capability: the agent pod downloads `<digest>.tar.gz` from the artifact endpoint and verifies it before extraction.

func (*WorkspaceRef) DeepCopy added in v0.9.3

func (in *WorkspaceRef) DeepCopy() *WorkspaceRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceRef.

func (*WorkspaceRef) DeepCopyInto added in v0.9.3

func (in *WorkspaceRef) DeepCopyInto(out *WorkspaceRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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