如何在SecurityHub中使用ResourceTags筛选器?

0

【以下的问题经过翻译处理】 你好,SecurityHub仪表板似乎提供了“resource tags”过滤器,然而,输入任何标签名称和值后,我知道某些现有事件受到影响的资源,没有返回结果。

使用API也是如此,我尝试运行以下命令:

aws securityhub get-findings --filters ResourceTags='[{Key=owner,Value=MY_EMAIL,Comparison=EQUALS}]'

但没有返回结果。

我在 [MapFilter]https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_MapFilter.html和 [AwsSecurityFindingFilters]https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_AwsSecurityFindingFilters.html文件中没有发现关于此的说明。

正确使用此过滤器的方法是什么?

profile picture
EXPERT
asked 5 months ago39 views
1 Answer
0

【以下的回答经过翻译处理】 资源标签过滤器不引用查找结果的“Resources”字段中包含的资源。 由于AWS文档并没有真正说明它实际指的是什么,我不能完全100%确定,但我相信这指的是属于SecurityHub本身的资源的标签。

最后,我决定采用不同的解决方案 - Lambda,它将结果中包含的资源中的标签映射到结果中的 UserDefinedFields 字段。 然后,可以基于此过滤结果。

profile picture
EXPERT
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions