CloudWatch log metric filter and alarm are not set for denied connections in VPC flow logs Affecting CloudWatch service in AWS
Severity Framework
Snyk CCSS
Rule category
Monitoring / Accounts Monitoring
Is your enviroment affected by this misconfiguration?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsFrameworks
AWS-Well-Architected
HIPAA
ISO-27001
NIST-800-53
SOC-2
- Snyk ID SNYK-CC-00156
- credit Snyk Research Team
Description
CloudWatch metric filters and alarms should be configured to alert users to rejected connections in VPC flow logs so users can investigate anomalous traffic.
How to fix?
Create an aws_cloudwatch_log_metric_filter
and aws_cloudwatch_metric_alarm
with an appropriate pattern attribute set for an aws_cloudwatch_log_group
and aws_cloudtrail
set of resources.
Use the following pattern attribute set:
$version
$account
$eni
$source
$destination
$srcport
$destport="22"
$protocol="6"
$packets
$bytes
$windowstart
$windowend
$action="REJECT"
$flowlogstatus