{"modulePath":"github.com/utmstack/UTMStack/plugins/feeds","version":"v0.0.0-20261126134315-738f65073a40","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package association\n\n## Variables\n\n```go\nvar DefaultRules = []*AssociationRule{\n\n\t{\n\t\tName:       \"ip-to-domain\",\n\t\tSourceType: \"ip\",\n\t\tTargetType: \"domain\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"domain-to-ip\",\n\t\tSourceType: \"domain\",\n\t\tTargetType: \"ip\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\n\t{\n\t\tName:       \"hostname-to-ip\",\n\t\tSourceType: \"hostname\",\n\t\tTargetType: \"ip\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"ip-to-hostname\",\n\t\tSourceType: \"ip\",\n\t\tTargetType: \"hostname\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\n\t{\n\t\tName:       \"ip-to-port\",\n\t\tSourceType: \"ip\",\n\t\tTargetType: \"port\",\n\t\tMode:       Aggregation,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"ip-to-mac\",\n\t\tSourceType: \"ip\",\n\t\tTargetType: \"mac-address\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"mac-to-ip\",\n\t\tSourceType: \"mac-address\",\n\t\tTargetType: \"ip\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"ip-to-asn\",\n\t\tSourceType: \"ip\",\n\t\tTargetType: \"asn\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\n\t{\n\t\tName:       \"url-to-domain\",\n\t\tSourceType: \"url\",\n\t\tTargetType: \"domain\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"url-to-ip\",\n\t\tSourceType: \"url\",\n\t\tTargetType: \"ip\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\n\t{\n\t\tName:       \"email-to-emailaddress\",\n\t\tSourceType: \"email\",\n\t\tTargetType: \"email-address\",\n\t\tMode:       Aggregation,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"email-to-domain\",\n\t\tSourceType: \"email\",\n\t\tTargetType: \"domain\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"email-to-ip\",\n\t\tSourceType: \"email\",\n\t\tTargetType: \"ip\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"emailaddress-to-domain\",\n\t\tSourceType: \"email-address\",\n\t\tTargetType: \"domain\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"domain-to-emailaddress\",\n\t\tSourceType: \"domain\",\n\t\tTargetType: \"email-address\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"dkim-to-domain\",\n\t\tSourceType: \"dkim\",\n\t\tTargetType: \"domain\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"dkim-signature-to-email\",\n\t\tSourceType: \"dkim-signature\",\n\t\tTargetType: \"email\",\n\t\tMode:       Aggregation,\n\t\tEnabled:    true,\n\t},\n\n\t{\n\t\tName:       \"file-to-path\",\n\t\tSourceType: \"file\",\n\t\tTargetType: \"path\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"file-to-mimetype\",\n\t\tSourceType: \"file\",\n\t\tTargetType: \"mime-type\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"file-to-ip\",\n\t\tSourceType: \"file\",\n\t\tTargetType: \"ip\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"file-to-url\",\n\t\tSourceType: \"file\",\n\t\tTargetType: \"url\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"file-to-domain\",\n\t\tSourceType: \"file\",\n\t\tTargetType: \"domain\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\n\t{\n\t\tName:       \"file-to-md5\",\n\t\tSourceType: \"file\",\n\t\tTargetType: \"md5\",\n\t\tMode:       Aggregation,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"file-to-sha1\",\n\t\tSourceType: \"file\",\n\t\tTargetType: \"sha1\",\n\t\tMode:       Aggregation,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"file-to-sha256\",\n\t\tSourceType: \"file\",\n\t\tTargetType: \"sha256\",\n\t\tMode:       Aggregation,\n\t\tEnabled:    true,\n\t},\n\n\t{\n\t\tName:       \"malware-to-domain\",\n\t\tSourceType: \"malware\",\n\t\tTargetType: \"domain\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"malware-to-ip\",\n\t\tSourceType: \"malware\",\n\t\tTargetType: \"ip\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"malware-to-file\",\n\t\tSourceType: \"malware\",\n\t\tTargetType: \"file\",\n\t\tMode:       Aggregation,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"file-to-malware\",\n\t\tSourceType: \"file\",\n\t\tTargetType: \"malware\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"malware-to-url\",\n\t\tSourceType: \"malware\",\n\t\tTargetType: \"url\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"malware-to-process\",\n\t\tSourceType: \"malware\",\n\t\tTargetType: \"process\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"process-to-malware\",\n\t\tSourceType: \"process\",\n\t\tTargetType: \"malware\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\n\t{\n\t\tName:       \"certificate-to-domain\",\n\t\tSourceType: \"certificate-fingerprint\",\n\t\tTargetType: \"domain\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"domain-to-certificate\",\n\t\tSourceType: \"domain\",\n\t\tTargetType: \"certificate-fingerprint\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"certificate-to-ip\",\n\t\tSourceType: \"certificate-fingerprint\",\n\t\tTargetType: \"ip\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"ja3-to-ip\",\n\t\tSourceType: \"ja3-fingerprint\",\n\t\tTargetType: \"ip\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"jarm-to-ip\",\n\t\tSourceType: \"jarm-fingerprint\",\n\t\tTargetType: \"ip\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"jarm-to-domain\",\n\t\tSourceType: \"jarm-fingerprint\",\n\t\tTargetType: \"domain\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"ssh-fingerprint-to-ip\",\n\t\tSourceType: \"ssh-fingerprint\",\n\t\tTargetType: \"ip\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"ssh-banner-to-ip\",\n\t\tSourceType: \"ssh-banner\",\n\t\tTargetType: \"ip\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\n\t{\n\t\tName:       \"process-to-ip\",\n\t\tSourceType: \"process\",\n\t\tTargetType: \"ip\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"ip-to-process\",\n\t\tSourceType: \"ip\",\n\t\tTargetType: \"process\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"process-to-file\",\n\t\tSourceType: \"process\",\n\t\tTargetType: \"file\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"file-to-process\",\n\t\tSourceType: \"file\",\n\t\tTargetType: \"process\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"process-to-command\",\n\t\tSourceType: \"process\",\n\t\tTargetType: \"command\",\n\t\tMode:       Aggregation,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"process-to-user\",\n\t\tSourceType: \"process\",\n\t\tTargetType: \"username\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"user-to-process\",\n\t\tSourceType: \"username\",\n\t\tTargetType: \"process\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"command-to-user\",\n\t\tSourceType: \"command\",\n\t\tTargetType: \"username\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"user-to-command\",\n\t\tSourceType: \"username\",\n\t\tTargetType: \"command\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"windows-task-to-user\",\n\t\tSourceType: \"windows-scheduled-task\",\n\t\tTargetType: \"username\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"windows-service-to-file\",\n\t\tSourceType: \"windows-service-name\",\n\t\tTargetType: \"file\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"hostname-to-user\",\n\t\tSourceType: \"hostname\",\n\t\tTargetType: \"username\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\n\t{\n\t\tName:       \"cve-to-cpe\",\n\t\tSourceType: \"cve\",\n\t\tTargetType: \"cpe\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"cpe-to-cve\",\n\t\tSourceType: \"cpe\",\n\t\tTargetType: \"cve\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"cve-to-file\",\n\t\tSourceType: \"cve\",\n\t\tTargetType: \"file\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"file-to-cve\",\n\t\tSourceType: \"file\",\n\t\tTargetType: \"cve\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"cve-to-ip\",\n\t\tSourceType: \"cve\",\n\t\tTargetType: \"ip\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"ip-to-cve\",\n\t\tSourceType: \"ip\",\n\t\tTargetType: \"cve\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\n\t{\n\t\tName:       \"cookie-to-domain\",\n\t\tSourceType: \"cookie\",\n\t\tTargetType: \"domain\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"domain-to-cookie\",\n\t\tSourceType: \"domain\",\n\t\tTargetType: \"cookie\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\n\t{\n\t\tName:       \"user-to-ip\",\n\t\tSourceType: \"username\",\n\t\tTargetType: \"ip\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"ip-to-user\",\n\t\tSourceType: \"ip\",\n\t\tTargetType: \"username\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"user-to-group\",\n\t\tSourceType: \"username\",\n\t\tTargetType: \"group\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"group-to-user\",\n\t\tSourceType: \"group\",\n\t\tTargetType: \"username\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"user-to-hostname\",\n\t\tSourceType: \"username\",\n\t\tTargetType: \"hostname\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"hostname-to-group\",\n\t\tSourceType: \"hostname\",\n\t\tTargetType: \"group\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n\t{\n\t\tName:       \"jabber-to-ip\",\n\t\tSourceType: \"jabber-id\",\n\t\tTargetType: \"ip\",\n\t\tMode:       Association,\n\t\tEnabled:    true,\n\t},\n}\n```\n\n## Types\n\n```go\ntype AssociationBuilder struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewAssociationBuilder() *AssociationBuilder\n```\n\n```go\nfunc (b *AssociationBuilder) BuildAssociations() []*entities.Entity\n```\n\n```go\nfunc (b *AssociationBuilder) ClearRegistry()\n```\n\n```go\nfunc (b *AssociationBuilder) RegisterEntity(entity *entities.Entity, entityID, sourcePath string, ctx AssociationContext)\n```\n\n```go\ntype AssociationContext struct {\n\tAlertID     string\n\tEventID     string\n\tIncidentID  string\n\tSourceField string\n}\n```\n\n```go\nfunc (ctx *AssociationContext) CrossEventAssociation(other AssociationContext) bool\n```\n\n```go\nfunc (ctx *AssociationContext) IsOrigin() bool\n```\n\n```go\nfunc (ctx *AssociationContext) IsOriginToTarget(other AssociationContext) bool\n```\n\n```go\nfunc (ctx *AssociationContext) IsTarget() bool\n```\n\n```go\nfunc (ctx *AssociationContext) SameAlert(other AssociationContext) bool\n```\n\n```go\nfunc (ctx *AssociationContext) SameEvent(other AssociationContext) bool\n```\n\n```go\ntype AssociationMode string\n```\n\n```go\nconst (\n\tAssociation AssociationMode = \"association\"\n\tAggregation AssociationMode = \"aggregation\"\n)\n```\n\n```go\ntype AssociationRule struct {\n\tName       string\n\tSourceType string\n\tTargetType string\n\tMode       AssociationMode\n\tEnabled    bool\n}\n```\n\n```go\nfunc GetEnabledRules() []*AssociationRule\n```\n\n```go\ntype EntityReference struct {\n\tEntity     any\n\tEntityID   string\n\tEntityType string\n\tSourcePath string\n\tContext    AssociationContext\n}\n```\n\n","path":"github.com/utmstack/UTMStack/plugins/feeds/internal/association","name":"association","synopsis":"","isRedistributable":true}
