|
| 1 | +// Copyright (c) F5, Inc. |
| 2 | +// |
| 3 | +// This source code is licensed under the Apache License, Version 2.0 license found in the |
| 4 | +// LICENSE file in the root directory of this source tree. |
| 5 | + |
| 6 | +package syslogprocessor |
| 7 | + |
| 8 | +// SecurityViolationEvent represents the structured NGINX App Protect security violation data |
| 9 | +type SecurityViolationEvent struct { |
| 10 | + PolicyName string `json:"policy_name"` |
| 11 | + SupportID string `json:"support_id"` |
| 12 | + Outcome string `json:"outcome"` |
| 13 | + OutcomeReason string `json:"outcome_reason"` |
| 14 | + BlockingExceptionReason string `json:"blocking_exception_reason"` |
| 15 | + Method string `json:"method"` |
| 16 | + Protocol string `json:"protocol"` |
| 17 | + XForwardedForHeaderValue string `json:"xff_header_value"` |
| 18 | + URI string `json:"uri"` |
| 19 | + Request string `json:"request"` |
| 20 | + IsTruncated string `json:"is_truncated"` |
| 21 | + RequestStatus string `json:"request_status"` |
| 22 | + ResponseCode string `json:"response_code"` |
| 23 | + ServerAddr string `json:"server_addr"` |
| 24 | + VSName string `json:"vs_name"` |
| 25 | + RemoteAddr string `json:"remote_addr"` |
| 26 | + RemotePort string `json:"destination_port"` |
| 27 | + ServerPort string `json:"server_port"` |
| 28 | + Violations string `json:"violations"` |
| 29 | + SubViolations string `json:"sub_violations"` |
| 30 | + ViolationRating string `json:"violation_rating"` |
| 31 | + SigSetNames string `json:"sig_set_names"` |
| 32 | + SigCVEs string `json:"sig_cves"` |
| 33 | + ClientClass string `json:"client_class"` |
| 34 | + ClientApplication string `json:"client_application"` |
| 35 | + ClientApplicationVersion string `json:"client_application_version"` |
| 36 | + Severity string `json:"severity"` |
| 37 | + ThreatCampaignNames string `json:"threat_campaign_names"` |
| 38 | + BotAnomalies string `json:"bot_anomalies"` |
| 39 | + BotCategory string `json:"bot_category"` |
| 40 | + EnforcedBotAnomalies string `json:"enforced_bot_anomalies"` |
| 41 | + BotSignatureName string `json:"bot_signature_name"` |
| 42 | + SystemID string `json:"system_id"` |
| 43 | + InstanceTags string `json:"instance_tags"` |
| 44 | + InstanceGroup string `json:"instance_group"` |
| 45 | + ParentHostname string `json:"parent_hostname"` |
| 46 | + DisplayName string `json:"display_name"` |
| 47 | + ViolationsData []ViolationData `json:"violations_data"` |
| 48 | +} |
| 49 | + |
| 50 | +type ViolationData struct { |
| 51 | + Name string `json:"violation_data_name"` |
| 52 | + Context string `json:"violation_data_context"` |
| 53 | + ContextData ContextData `json:"violation_data_context_data"` |
| 54 | + Signatures []SignatureData `json:"violation_data_signatures"` |
| 55 | +} |
| 56 | + |
| 57 | +// SignatureData represents signature data contained within each violation |
| 58 | +type SignatureData struct { |
| 59 | + ID string `json:"sig_data_id"` |
| 60 | + BlockingMask string `json:"sig_data_blocking_mask"` |
| 61 | + Buffer string `json:"sig_data_buffer"` |
| 62 | + Offset string `json:"sig_data_offset"` |
| 63 | + Length string `json:"sig_data_length"` |
| 64 | +} |
| 65 | + |
| 66 | +// ContextData represents the context data of the violation |
| 67 | +type ContextData struct { |
| 68 | + Name string `json:"parameter_data_name"` |
| 69 | + Value string `json:"parameter_data_value"` |
| 70 | +} |
0 commit comments