Skip to content

feat: Support selector on describe#425

Merged
roneli merged 8 commits into
cloudquery:mainfrom
bbernays:Support-Selector-on-Describe
Jan 20, 2022
Merged

feat: Support selector on describe#425
roneli merged 8 commits into
cloudquery:mainfrom
bbernays:Support-Selector-on-Describe

Conversation

@bbernays
Copy link
Copy Markdown
Collaborator

@bbernays bbernays commented Jan 19, 2022

cloudquery % go run main.go policy describe aws//foundational_security
Describe Policy aws output:

+----------------------------------------------+--------------------------------+
|                     PATH                     |          DESCRIPTION           |
+----------------------------------------------+--------------------------------+
| aws//foundational_security                   | AWS Foundational Security Best |
|                                              | Practices controls             |
| aws//foundational_security/acm               | acm controls                   |
| aws//foundational_security/apigateway        | apigateway controls            |
| aws//foundational_security/autoscaling       | autoscaling controls           |
| aws//foundational_security/cloudfront        | cloudfront controls            |
| aws//foundational_security/cloudtrail        | cloudtrail controls            |
| aws//foundational_security/codebuild         | codebuild controls             |
| aws//foundational_security/config            | AWS config controls            |
| aws//foundational_security/dms               | AWS DMS controls               |
| aws//foundational_security/dynamodb          | DynamoDB controls              |
| aws//foundational_security/ec2               | EC2 controls                   |
| aws//foundational_security/ecs               | ECS controls                   |
| aws//foundational_security/efs               | EFS controls                   |
| aws//foundational_security/elastic_beanstalk | ElasticBeanstalk controls      |
| aws//foundational_security/elb               | ELB controls                   |
| aws//foundational_security/elbv2             | ELBv2 controls                 |
| aws//foundational_security/emr               | EMR controls                   |
| aws//foundational_security/elasticsearch     | Elasticsearch controls         |
| aws//foundational_security/guardduty         | GuardDuty controls             |
| aws//foundational_security/iam               | IAM controls                   |
| aws//foundational_security/kms               | KMS controls                   |
| aws//foundational_security/lambda            | Lambda controls                |
| aws//foundational_security/rds               | RDS controls                   |
| aws//foundational_security/redshift          | Redshift controls              |
| aws//foundational_security/s3                | S3 controls                    |
| aws//foundational_security/sagemaker         | SageMaker                      |
| aws//foundational_security/secretsmanager    | SecretsManager controls        |
| aws//foundational_security/sns               | SNS                            |
| aws//foundational_security/sqs               | SQS                            |
| aws//foundational_security/ssm               | SSM controls                   |
| aws//foundational_security/waf               | WAF controls                   |
+----------------------------------------------+--------------------------------+
To execute any policy use the path defined in the table above.
For example `cloudquery policy run aws//cis_v1.2.0`

@github-actions github-actions Bot added the feat label Jan 19, 2022
@bbernays bbernays requested review from disq and roneli January 19, 2022 22:02
@github-actions github-actions Bot added feat and removed feat labels Jan 19, 2022
Copy link
Copy Markdown
Contributor

@roneli roneli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, had one suggestion/nit, since I think the selector parsing is similar to in the executor I think we can use this function there (at least for subpolicies and not checks). Make tests pass and answer my comment and we can merge.

Comment thread pkg/policy/policy.go
@bbernays bbernays requested a review from roneli January 20, 2022 13:51
@roneli roneli merged commit fc37402 into cloudquery:main Jan 20, 2022
@bbernays bbernays deleted the Support-Selector-on-Describe branch January 26, 2022 20:07
erezrokah pushed a commit that referenced this pull request Aug 14, 2022

#### Summary

<!--
Explain what problem this PR addresses
-->

---
erezrokah pushed a commit that referenced this pull request Aug 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants