AWS Security Hub Findings
Ingests findings from AWS Security Hub for continuous monitoring and analysis.
Sync Type: Streaming
Details
The AWS Security Hub input collects findings from the AWS Security Hub service. These findings provide insights into the security posture of your AWS environment, helping you identify and remediate potential security issues.
The input processes messages from an Amazon SQS queue that is configured to receive findings from AWS Security Hub via EventBridge. On each run of its cron schedule, the input reads messages from the queue until the queue is empty, emits one record per finding in each message, and deletes each message after its findings are emitted.
How queue messages are handled
- Security Hub sends a Security Hub Findings - Imported event each time a finding is created or updated, so the same finding (same
Id) can arrive several times; deduplicate or upsert onIddownstream if you need one record per finding. - Delivery is at-least-once: a message is deleted only after its findings are emitted, so if a run stops before a message is deleted, the message is delivered again and its findings can repeat.
- Monad sets its own visibility timeout when it reads messages, overriding the queue's default visibility timeout.
- If several Monad inputs or pipelines read the same queue, they split the messages between them: each message goes to only one of them. To send the same findings to more than one pipeline, create one queue per pipeline and add each queue as a separate target of the EventBridge rule.
- Every message must be a Security Hub findings event (with a
detail.findingsarray). A message in any other shape (for example, a test message sent by hand) makes the run fail and is not deleted, so it is delivered again and blocks later runs until it is removed from the queue. Send only Security Hub findings events to the queue; a dead-letter queue (redrive policy) on the queue moves such a message aside after repeated failures.
One queue per pipeline
Do not point two pipelines at the same SQS queue, whether they share this input or each have their own input with the same queue URL. The pipelines compete for the queue's messages: each message is delivered to only one of them and then deleted, so each pipeline silently receives only part of the data. To send this data to several destinations, add more outputs to a single pipeline, or give each pipeline its own queue. See Using One Input in Multiple Pipelines for both patterns.
Prerequisites
- AWS Security Hub must be enabled in your AWS account.
- You must configure an EventBridge rule to send Security Hub findings to an SQS queue.
- Create an IAM role that Monad can assume, granting it the necessary permissions to access the SQS queue.
Setup Instructions
Note: Skip to Step 4 if you prefer CloudFormation method
Step 1: Create an SQS Queue
- Sign in to the AWS Management Console.
- Navigate to the Amazon SQS service.
- Click Create queue.
- Select Standard queue type.
- Enter a name for your queue (e.g.,
security-hub-findings-queue). - Keep the default settings or adjust as needed. (Retention Period of 14 days is recommended.)
- Click Create queue.
- Note the queue URL for later use in the configuration.
Step 2: Set Up EventBridge Rule
- Navigate to the Amazon EventBridge service.
- Click on Rules in the left navigation panel.
- Click Create rule.
- Under Define rule detail:
- Enter a name (e.g.,
security-hub-findings-rule). - Optionally add a description.
- For Rule type, select Rule with an event pattern.
- Click Next.
- Enter a name (e.g.,
- Under Build event pattern:
- For Event source, select AWS services.
- For AWS service, select Security Hub.
- For Event type, select Security Hub Findings - Imported.
- Optionally, add filters for specific findings:
- To filter by severity, select specific values under Specific Severity Label(s).
- To filter by other criteria, expand the Additional settings section.
- Click Next.
- Under Select targets:
- From the Target types dropdown, select AWS service.
- From the Select a target dropdown, choose SQS queue.
- For Queue, select the queue you created in Step 1.
- Click Next.
- Skip tags configuration by clicking Next.
- Review your configuration and click Create rule.
Step 3: Create IAM Role for Access
- Follow the IAM Role Setup Guide in the main AWS documentation. Use the permissions shown below to attach to the role. You can also create a user and use static credentials instead.
Code
- Replace
[SQS-QUEUE-ARN]with the ARN of your SQS queue. - If the queue uses server-side encryption with a customer managed KMS key (SSE-KMS), the role also needs
kms:Decrypton that key, and the key policy must allow EventBridge (events.amazonaws.com) to usekms:GenerateDataKeyandkms:Decryptso it can deliver findings to the queue. - Give the role a name (e.g.,
SecurityHubFindingsRole). - Click Create role.
- Note the ARN of the created role for later use in the configuration.
Step 4: CloudFormation Template (Optional)
If you prefer to deploy the entire solution using CloudFormation, you can use the following template:
Code
Set MonadOrganizationId to your Monad organization ID.
Monad does not check whether your trust policy requires the external ID, so keep the sts:ExternalId condition: without it, anyone with a Monad organization who knows your role ARN could configure Monad to assume your role.
See IAM Role Assumption for details.
Configuration
The following configuration defines the input parameters. Each field's specifications, such as type, requirements, and descriptions, are detailed below.
Settings
| Setting | Type | Required | Default | Description |
|---|---|---|---|---|
queue_url | string | Yes | - | URL of the SQS queue to be used for AWS Security Hub integration. |
role_arn | string | No | - | ARN of the IAM role to assume for accessing AWS Queue. |
region | string | Yes | us-east-1 | AWS region where the SQS queue and Security Hub are located. Allowed values: us-east-1, us-east-2, us-west-1, us-west-2, af-south-1, ap-east-1, ap-south-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-southeast-1, ap-southeast-2, ca-central-1, ca-west-1, cn-north-1, cn-northwest-1, eu-central-1, eu-west-1, eu-west-2, eu-west-3, eu-north-1, eu-south-1, me-south-1, sa-east-1, us-gov-east-1, us-gov-west-1. |
cron | string (cron) | Yes | 0 * * * * | Cron string for scheduling the ingest of your input. eg: 0 0 * * * - Daily at midnight, or */15 * * * * - Every 15 minutes. Defaults to an hour. |
use_synthetic_data | bool | No | false | Generate synthetic data for testing, instead of connecting to a real data source. Defaults to an hourly cron schedule for cron-based inputs. |
Secrets (Static Credentials Only)
| Secret | Type | Required | Description |
|---|---|---|---|
access_key | secret | No | The Access Key from AWS to authenticate with AWS |
secret_key | secret | No | The Secret Key from AWS to authenticate with AWS |
⚠️ Authentication: Choose either Role ARN (recommended) or static credentials. See AWS Authentication Guide for setup instructions.
Troubleshooting
- If no findings are being received, check that Security Hub is properly configured and generating findings.
- Verify that the EventBridge rule is correctly configured to capture Security Hub findings.
- Ensure the SQS queue policy allows EventBridge to send messages to the queue.
- Check IAM permissions to ensure Monad can assume the role and the role has appropriate permissions for the SQS queue.
- If every run fails and messages stay on the queue, look for a message in the queue that is not a Security Hub findings event and remove it (see How queue messages are handled).
Related Articles
Sample Record
Code
Sync frequency
This input runs on a cron schedule (default hourly, 0 * * * *), which you can configure on the pipeline.
See Input Sync Frequency for details.
Community transforms
The Monad Transforms Repository has ready-made transforms for this input. Import one into your organization, then add it to a pipeline after this input.
| Format | Transform |
|---|---|
| OCSF v1.9.0 | AWS Security Hub Findings to OCSF v1.9.0 |
| ECS v9.5.0 | AWS Security Hub Findings to ECS v9.5.0 |
| CEF | AWS Security Hub Findings to CEF |
CEF transforms emit an intermediate record; add the CEF Serializer transform after one to produce the CEF:0 string.