Documentation
¶
Overview ¶
Package attackpath assembles tenant-scoped attack paths from existing records.
Index ¶
- type Recorder
- func (r *Recorder) AssetIDByKey(ctx context.Context, tenantID shared.ID, kind asset.Kind, key string) (shared.ID, error)
- func (r *Recorder) InheritedAssetID(ctx context.Context, engagementID shared.ID, findingIDs []shared.ID) (shared.ID, error)
- func (r *Recorder) Record(ctx context.Context, engagementID, assetID, producer, provenance shared.ID, ...) error
- func (r *Recorder) RecordTargets(ctx context.Context, engagementID, assetID, producer, provenance shared.ID, ...) error
- func (r *Recorder) ValidateAsset(ctx context.Context, engagementID, assetID shared.ID) error
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
Recorder writes producer-owned finding attribution. It never guesses from finding prose.
func NewRecorder ¶
func NewRecorder(assets ports.AssetRepository, store ports.AttackPathStore, engagements ports.EngagementRepository) (*Recorder, error)
func (*Recorder) AssetIDByKey ¶
func (*Recorder) InheritedAssetID ¶
func (r *Recorder) InheritedAssetID(ctx context.Context, engagementID shared.ID, findingIDs []shared.ID) (shared.ID, error)
InheritedAssetID returns an asset only when every referenced finding has exactly one common binding.
func (*Recorder) Record ¶
func (r *Recorder) Record(ctx context.Context, engagementID, assetID, producer, provenance shared.ID, confidence asset.EdgeConfidence, findingIDs []shared.ID) error
Record replaces this producer's complete observation after its canonical findings are persisted.
func (*Recorder) RecordTargets ¶
func (r *Recorder) RecordTargets(ctx context.Context, engagementID, assetID, producer, provenance shared.ID, confidence asset.EdgeConfidence, targets []ap.FindingTarget) error
RecordTargets replaces this producer's complete observation after its typed targets are persisted.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service computes paths on demand; it never persists or executes a path.
func NewService ¶
func NewService(assets ports.AssetRepository, bindings ports.AttackPathStore, findings ports.FindingRepository, imported ports.ImportedFindingStore, judgments ports.JudgmentStore, engagements ports.EngagementRepository, limits ap.Limits) (*Service, error)
Click to show internal directories.
Click to hide internal directories.