need prisma RQL query to fetch account name where "xxx" cloudtrail account is not present

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

need prisma RQL query to fetch account name where "xxx" cloudtrail account is not present

L0 Member

need prisma RQL query to fetch account name where "xxx" aws cloudtrail account is not present, whichever account is not present, I should list that account as Non-compliant, and if "xxx" present and is not matching specific configuration also list out as non-compliant, is this possible???? 

I have split queries, how would merge this queries and show all required results. 
config from cloud.resource where api.name ='aws-cloudtrail-describe-trails' AND json.rule = name equal "xxx" as X; count(X) less than 1     
#this above one would list down all the accounts where "xxx" cloud trail is not present

config from cloud.resource where cloud.type = 'aws' and api.name = 'aws-cloudtrail-describe-trails' and json.rule = name equals "xxx" and trailARN contains ":us-east-1"

1 REPLY 1

L3 Networker



At this time we do not have an API that we ingest that shows the AWS account information and if cloud trail is enabled on the account.  I checked the json on the two API’s that would fall under your request and nothing related to cloud trail is displayed.  Let me check with the team if we have another workaround, but use the below query below to get more details on the cloudtrail status.

 

config from cloud.resource where api.name= 'aws-cloudtrail-describe-trails' as X; config from cloud.resource where api.name= 'aws-cloudtrail-get-trail-status' AND json.rule = 'status.isLogging equals true' as Y; filter'($.X.name equals $.Y.trail)'; show Y; count(Y) less than 1

 

  • 3961 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!