Documentation
¶
Index ¶
- func ValidateGraphContract(bundle NormalizedBundle, relationships []domain.Relationship) error
- func ValidateNormalizedBundle(bundle NormalizedBundle) error
- type Collector
- type DiagnosticCollector
- type NormalizedBundle
- type Normalizer
- type PermissionResolver
- type PermissionTuple
- type RawAsset
- type RelationshipResolver
- type RiskRuleSet
- type SourceError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateGraphContract ¶
func ValidateGraphContract(bundle NormalizedBundle, relationships []domain.Relationship) error
ValidateGraphContract enforces edge integrity and relationship consistency across normalized entities and graph edges.
func ValidateNormalizedBundle ¶
func ValidateNormalizedBundle(bundle NormalizedBundle) error
ValidateNormalizedBundle enforces required normalized-schema invariants for v1.
Types ¶
type Collector ¶
Collector pulls raw assets from a source provider (AWS, Kubernetes, Azure). This interface ensures provider abstraction for scalability and testability.
type DiagnosticCollector ¶
type DiagnosticCollector interface {
CollectWithDiagnostics(ctx context.Context) ([]RawAsset, []SourceError, error)
}
DiagnosticCollector is an optional collector contract for partial-failure reporting.
type NormalizedBundle ¶
type NormalizedBundle struct {
Identities []domain.Identity
Workloads []domain.Workload
Policies []domain.Policy
Resources []domain.Resource
Credentials []domain.Credential
Agents []domain.Agent
RuntimeEvents []domain.RuntimeEvent
}
NormalizedBundle contains all normalized entities produced in one pass.
type Normalizer ¶
type Normalizer interface {
Normalize(ctx context.Context, raw []RawAsset) (NormalizedBundle, error)
}
Normalizer transforms provider-native assets into provider-agnostic domain records.
type PermissionResolver ¶
type PermissionResolver interface {
ResolvePermissions(ctx context.Context, bundle NormalizedBundle) ([]PermissionTuple, error)
}
PermissionResolver expands policies into concrete permission tuples.
type PermissionTuple ¶
PermissionTuple is a semantic permission unit used for graph and rule evaluation.
type RelationshipResolver ¶
type RelationshipResolver interface {
ResolveRelationships(ctx context.Context, bundle NormalizedBundle, perms []PermissionTuple) ([]domain.Relationship, error)
}
RelationshipResolver builds graph edges from normalized assets and permissions.
type RiskRuleSet ¶
type RiskRuleSet interface {
Evaluate(ctx context.Context, bundle NormalizedBundle, relationships []domain.Relationship) ([]domain.Finding, error)
}
RiskRuleSet executes deterministic risk checks over normalized data and relationships.
type SourceError ¶
type SourceError struct {
Collector string `json:"collector"`
SourceID string `json:"source_id,omitempty"`
Code string `json:"code"`
Message string `json:"message"`
Retryable bool `json:"retryable"`
}
SourceError captures non-fatal collection issues discovered during one run. These errors are surfaced as scan lifecycle warnings without failing the scan.