rql to bring back account_names that are not running a 'named' CloudTrail

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

rql to bring back account_names that are not running a 'named' CloudTrail

L2 Linker

Hello team.

 

I have a named CloudTrail which every account must have.  aws-landing-zone-logs-us-east-1

 

Some accounts have additional CloudTrails in addition to the above for there own purposes.

 

I want an alert that tells me if 'any' account does not have a CloudTrail called aws-landing-zone-logs-us-east-1 but IMPORTANTLY ignoring any other CloudTrail they may already have.

 

The problem is that the below is alerting even though an account has aws-landing-zone-logs-us-east-1 because it is alerting for the additional CloudTrails also on that account.

 

config where api.name='aws-cloudtrail-describe-trails' AND cloud.type = 'aws' AND json.rule = "(s3BucketName!= aws-landing-zone-logs-us-east-1)"

 

Your help welcome and can't figure how to do it. 

 

1 accepted solution

Accepted Solutions

L3 Networker

RQL is built for looking for resources that exist and have a certain configuration.  There isn't a good way to detect for resources that should exist without also alerting on other matching resources.  Using a script or a SIEM to further filter out the resources you don't care about is also an option.

View solution in original post

1 REPLY 1

L3 Networker

RQL is built for looking for resources that exist and have a certain configuration.  There isn't a good way to detect for resources that should exist without also alerting on other matching resources.  Using a script or a SIEM to further filter out the resources you don't care about is also an option.

  • 1 accepted solution
  • 4850 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!