turbot / steampipe-plugin-aws

Use SQL to instantly query AWS resources across regions and accounts. Open source CLI. No DB required.
https://hub.steampipe.io/plugins/turbot/aws
Apache License 2.0
191 stars 103 forks source link

Add table aws_securityhub_enabled_product_subscription Closes #2256 #2281

Closed ParthaI closed 2 months ago

ParthaI commented 3 months ago

Integration test logs

Logs ``` N/A ```

Example query results

Results ``` > select distinct s.arn as subscription_arn, p.product_arn, p.name as product_name, p.company_name as product_company_name, p.marketplace_url, p.integration_types from aws_securityhub_enabled_product_subscription as s, aws_securityhub_product as p, jsonb_array_elements(p.product_subscription_resource_policy -> 'Statement') as m where (m ->> 'Resource') = s.arn; +----------------------------------------------------------------------------------------+---------------------------------------------------------------+-------------------------------+----------------------+--------------------------------------------------------------+---------------------------------------+ | subscription_arn | product_arn | product_name | product_company_name | marketplace_url | integration_types | +----------------------------------------------------------------------------------------+---------------------------------------------------------------+-------------------------------+----------------------+--------------------------------------------------------------+---------------------------------------+ | arn:aws:securityhub:ap-south-1:xxxxxxxxxxxx:product-subscription/aws/access-analyzer | arn:aws:securityhub:ap-south-1::product/aws/access-analyzer | IAM Access Analyzer | AWS | https://console.aws.amazon.com/access-analyzer/home | ["SEND_FINDINGS_TO_SECURITY_HUB"] | | arn:aws:securityhub:ap-south-1:xxxxxxxxxxxx:product-subscription/aws/config | arn:aws:securityhub:ap-south-1::product/aws/config | Config | AWS | https://console.aws.amazon.com/config/home | ["SERVICE_TO_SERVICE_EVENT_DELIVERY"] | | arn:aws:securityhub:ap-south-1:xxxxxxxxxxxx:product-subscription/aws/firewall-manager | arn:aws:securityhub:ap-south-1::product/aws/firewall-manager | Firewall Manager | AWS | https://console.aws.amazon.com/wafv2/fmsv2#/home | ["SEND_FINDINGS_TO_SECURITY_HUB"] | | arn:aws:securityhub:ap-south-1:xxxxxxxxxxxx:product-subscription/aws/guardduty | arn:aws:securityhub:ap-south-1::product/aws/guardduty | GuardDuty | Amazon | https://console.aws.amazon.com/guardduty/home | ["SEND_FINDINGS_TO_SECURITY_HUB"] | | arn:aws:securityhub:ap-south-1:xxxxxxxxxxxx:product-subscription/aws/health | arn:aws:securityhub:ap-south-1::product/aws/health | Health | AWS | https://phd.aws.amazon.com/phd/home#/dashboard/open-issues | ["SERVICE_TO_SERVICE_EVENT_DELIVERY"] | | arn:aws:securityhub:ap-south-1:xxxxxxxxxxxx:product-subscription/aws/inspector | arn:aws:securityhub:ap-south-1::product/aws/inspector | Inspector | Amazon | https://console.aws.amazon.com/inspector/v2/home | ["SEND_FINDINGS_TO_SECURITY_HUB"] | | arn:aws:securityhub:ap-south-1:xxxxxxxxxxxx:product-subscription/aws/macie | arn:aws:securityhub:ap-south-1::product/aws/macie | Macie | Amazon | https://console.aws.amazon.com/macie | ["SEND_FINDINGS_TO_SECURITY_HUB"] | | arn:aws:securityhub:ap-south-1:xxxxxxxxxxxx:product-subscription/aws/ssm-patch-manager | arn:aws:securityhub:ap-south-1::product/aws/ssm-patch-manager | Systems Manager Patch Manager | AWS | https://console.aws.amazon.com/systems-manager/patch-manager | ["SEND_FINDINGS_TO_SECURITY_HUB"] | | arn:aws:securityhub:eu-west-1:xxxxxxxxxxxx:product-subscription/aws/access-analyzer | arn:aws:securityhub:eu-west-1::product/aws/access-analyzer | IAM Access Analyzer | AWS | https://console.aws.amazon.com/access-analyzer/home | ["SEND_FINDINGS_TO_SECURITY_HUB"] | | arn:aws:securityhub:eu-west-1:xxxxxxxxxxxx:product-subscription/aws/config | arn:aws:securityhub:eu-west-1::product/aws/config | Config | AWS | https://console.aws.amazon.com/config/home | ["SERVICE_TO_SERVICE_EVENT_DELIVERY"] | | arn:aws:securityhub:eu-west-1:xxxxxxxxxxxx:product-subscription/aws/firewall-manager | arn:aws:securityhub:eu-west-1::product/aws/firewall-manager | Firewall Manager | AWS | https://console.aws.amazon.com/wafv2/fmsv2#/home | ["SEND_FINDINGS_TO_SECURITY_HUB"] | | arn:aws:securityhub:eu-west-1:xxxxxxxxxxxx:product-subscription/aws/guardduty | arn:aws:securityhub:eu-west-1::product/aws/guardduty | GuardDuty | Amazon | https://console.aws.amazon.com/guardduty/home | ["SEND_FINDINGS_TO_SECURITY_HUB"] | | arn:aws:securityhub:eu-west-1:xxxxxxxxxxxx:product-subscription/aws/health | arn:aws:securityhub:eu-west-1::product/aws/health | Health | AWS | https://phd.aws.amazon.com/phd/home#/dashboard/open-issues | ["SERVICE_TO_SERVICE_EVENT_DELIVERY"] | | arn:aws:securityhub:eu-west-1:xxxxxxxxxxxx:product-subscription/aws/inspector | arn:aws:securityhub:eu-west-1::product/aws/inspector | Inspector | Amazon | https://console.aws.amazon.com/inspector/v2/home | ["SEND_FINDINGS_TO_SECURITY_HUB"] | | arn:aws:securityhub:eu-west-1:xxxxxxxxxxxx:product-subscription/aws/macie | arn:aws:securityhub:eu-west-1::product/aws/macie | Macie | Amazon | https://console.aws.amazon.com/macie | ["SEND_FINDINGS_TO_SECURITY_HUB"] | | arn:aws:securityhub:eu-west-1:xxxxxxxxxxxx:product-subscription/aws/ssm-patch-manager | arn:aws:securityhub:eu-west-1::product/aws/ssm-patch-manager | Systems Manager Patch Manager | AWS | https://console.aws.amazon.com/systems-manager/patch-manager | ["SEND_FINDINGS_TO_SECURITY_HUB"] | +----------------------------------------------------------------------------------------+---------------------------------------------------------------+-------------------------------+----------------------+--------------------------------------------------------------+---------------------------------------+ ```