Documentation
¶
Overview ¶
Package threatactor provides domain models for threat actor intelligence. Threat actor data is enrichment — typically imported from STIX/TAXII feeds or MISP, not manually created. Links to CVEs and findings for prioritization.
Index ¶
- type ActorType
- type ExternalReference
- type Filter
- type Repository
- type TTP
- type ThreatActor
- func (t *ThreatActor) ActorType() ActorType
- func (t *ThreatActor) Aliases() []string
- func (t *ThreatActor) CountryOfOrigin() string
- func (t *ThreatActor) CreatedAt() time.Time
- func (t *ThreatActor) Description() string
- func (t *ThreatActor) ExternalReferences() []ExternalReference
- func (t *ThreatActor) FirstSeen() *time.Time
- func (t *ThreatActor) ID() shared.ID
- func (t *ThreatActor) IsActive() bool
- func (t *ThreatActor) LastSeen() *time.Time
- func (t *ThreatActor) MitreGroupID() string
- func (t *ThreatActor) Motivation() string
- func (t *ThreatActor) Name() string
- func (t *ThreatActor) SetIntel(sophistication, motivation, country, mitreGroupID string)
- func (t *ThreatActor) SetTTPs(ttps []TTP)
- func (t *ThreatActor) SetTargeting(industries, regions []string)
- func (t *ThreatActor) Sophistication() string
- func (t *ThreatActor) TTPs() []TTP
- func (t *ThreatActor) Tags() []string
- func (t *ThreatActor) TargetIndustries() []string
- func (t *ThreatActor) TargetRegions() []string
- func (t *ThreatActor) TenantID() shared.ID
- func (t *ThreatActor) Update(name, description string, actorType ActorType)
- func (t *ThreatActor) UpdatedAt() time.Time
- type ThreatActorCVE
- func (c *ThreatActorCVE) Confidence() string
- func (c *ThreatActorCVE) CreatedAt() time.Time
- func (c *ThreatActorCVE) CveID() string
- func (c *ThreatActorCVE) FirstObserved() *time.Time
- func (c *ThreatActorCVE) ID() shared.ID
- func (c *ThreatActorCVE) Notes() string
- func (c *ThreatActorCVE) Source() string
- func (c *ThreatActorCVE) TenantID() shared.ID
- func (c *ThreatActorCVE) ThreatActorID() shared.ID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExternalReference ¶
type ExternalReference struct {
Source string `json:"source"`
URL string `json:"url"`
Description string `json:"description"`
}
ExternalReference links to external intelligence sources.
type Repository ¶
type Repository interface {
Create(ctx context.Context, actor *ThreatActor) error
GetByID(ctx context.Context, tenantID, id shared.ID) (*ThreatActor, error)
Update(ctx context.Context, actor *ThreatActor) error
Delete(ctx context.Context, tenantID, id shared.ID) error
List(ctx context.Context, filter Filter, page pagination.Pagination) (pagination.Result[*ThreatActor], error)
// CVE links
LinkCVE(ctx context.Context, cve *ThreatActorCVE) error
ListCVEsByActor(ctx context.Context, tenantID, actorID shared.ID) ([]*ThreatActorCVE, error)
ListActorsByCVE(ctx context.Context, tenantID shared.ID, cveID string) ([]*ThreatActor, error)
}
Repository defines persistence for threat actors.
type TTP ¶
type TTP struct {
Tactic string `json:"tactic"`
TechniqueID string `json:"technique_id"`
TechniqueName string `json:"technique_name"`
}
TTP represents a MITRE ATT&CK Tactic, Technique, and Procedure.
type ThreatActor ¶
type ThreatActor struct {
// contains filtered or unexported fields
}
ThreatActor represents a known threat actor profile.
func NewThreatActor ¶
NewThreatActor creates a new threat actor.
func ReconstituteThreatActor ¶
func ReconstituteThreatActor( id, tenantID shared.ID, name string, aliases []string, description string, actorType ActorType, sophistication, motivation, countryOfOrigin string, firstSeen, lastSeen *time.Time, isActive bool, mitreGroupID string, ttps []TTP, targetIndustries, targetRegions []string, externalReferences []ExternalReference, tags []string, createdAt, updatedAt time.Time, ) *ThreatActor
ReconstituteThreatActor creates from persisted data.
func (*ThreatActor) ActorType ¶
func (t *ThreatActor) ActorType() ActorType
func (*ThreatActor) Aliases ¶
func (t *ThreatActor) Aliases() []string
func (*ThreatActor) CountryOfOrigin ¶
func (t *ThreatActor) CountryOfOrigin() string
func (*ThreatActor) CreatedAt ¶
func (t *ThreatActor) CreatedAt() time.Time
func (*ThreatActor) Description ¶
func (t *ThreatActor) Description() string
func (*ThreatActor) ExternalReferences ¶
func (t *ThreatActor) ExternalReferences() []ExternalReference
func (*ThreatActor) FirstSeen ¶
func (t *ThreatActor) FirstSeen() *time.Time
func (*ThreatActor) IsActive ¶
func (t *ThreatActor) IsActive() bool
func (*ThreatActor) LastSeen ¶
func (t *ThreatActor) LastSeen() *time.Time
func (*ThreatActor) MitreGroupID ¶
func (t *ThreatActor) MitreGroupID() string
func (*ThreatActor) Motivation ¶
func (t *ThreatActor) Motivation() string
func (*ThreatActor) Name ¶
func (t *ThreatActor) Name() string
func (*ThreatActor) SetIntel ¶
func (t *ThreatActor) SetIntel(sophistication, motivation, country, mitreGroupID string)
SetIntel sets intelligence details.
func (*ThreatActor) SetTTPs ¶
func (t *ThreatActor) SetTTPs(ttps []TTP)
SetTTPs sets MITRE ATT&CK tactics, techniques, and procedures.
func (*ThreatActor) SetTargeting ¶
func (t *ThreatActor) SetTargeting(industries, regions []string)
SetTargeting sets targeted industries and regions.
func (*ThreatActor) Sophistication ¶
func (t *ThreatActor) Sophistication() string
func (*ThreatActor) TTPs ¶
func (t *ThreatActor) TTPs() []TTP
func (*ThreatActor) Tags ¶
func (t *ThreatActor) Tags() []string
func (*ThreatActor) TargetIndustries ¶
func (t *ThreatActor) TargetIndustries() []string
func (*ThreatActor) TargetRegions ¶
func (t *ThreatActor) TargetRegions() []string
func (*ThreatActor) TenantID ¶
func (t *ThreatActor) TenantID() shared.ID
func (*ThreatActor) Update ¶
func (t *ThreatActor) Update(name, description string, actorType ActorType)
Update sets mutable fields.
func (*ThreatActor) UpdatedAt ¶
func (t *ThreatActor) UpdatedAt() time.Time
type ThreatActorCVE ¶
type ThreatActorCVE struct {
// contains filtered or unexported fields
}
ThreatActorCVE links a threat actor to a CVE.
func NewThreatActorCVE ¶
func NewThreatActorCVE(tenantID, actorID shared.ID, cveID, confidence, source string) *ThreatActorCVE
NewThreatActorCVE creates a new threat actor CVE link.
func (*ThreatActorCVE) Confidence ¶
func (c *ThreatActorCVE) Confidence() string
func (*ThreatActorCVE) CreatedAt ¶
func (c *ThreatActorCVE) CreatedAt() time.Time
func (*ThreatActorCVE) CveID ¶
func (c *ThreatActorCVE) CveID() string
func (*ThreatActorCVE) FirstObserved ¶
func (c *ThreatActorCVE) FirstObserved() *time.Time
func (*ThreatActorCVE) Notes ¶
func (c *ThreatActorCVE) Notes() string
func (*ThreatActorCVE) Source ¶
func (c *ThreatActorCVE) Source() string
func (*ThreatActorCVE) TenantID ¶
func (c *ThreatActorCVE) TenantID() shared.ID
func (*ThreatActorCVE) ThreatActorID ¶
func (c *ThreatActorCVE) ThreatActorID() shared.ID