Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(DocumentDB): New DocumentDB checks #4247

Merged
merged 2 commits into from
Jun 24, 2024

Conversation

sansns
Copy link
Contributor

@sansns sansns commented Jun 13, 2024

Context

New Checks

  1. Backup enabled
  2. Cloudwatch Log Export for Profiler and Audit checks
  3. Deletion Protection enabled

Modified Checks

  1. Changed DocumentDB Instance storage encrypted check to check the Clusters storage encryption.

Description

Trend Conformity: https://www.trendmicro.com/cloudoneconformity-staging/knowledge-base/aws/DocumentDB/
AWS Security Hub: https://docs.aws.amazon.com/securityhub/latest/userguide/documentdb-controls.html

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sansns sansns requested review from a team as code owners June 13, 2024 02:26
@github-actions github-actions bot added the provider/aws Issues/PRs related with the AWS provider label Jun 13, 2024
Copy link

codecov bot commented Jun 13, 2024

Codecov Report

Attention: Patch coverage is 97.93814% with 2 lines in your changes missing coverage. Please review.

Project coverage is 86.78%. Comparing base (6fec855) to head (1e899c8).
Report is 33 commits behind head on master.

Files Patch % Lines
...ders/aws/services/documentdb/documentdb_service.py 92.59% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4247      +/-   ##
==========================================
+ Coverage   86.65%   86.78%   +0.12%     
==========================================
  Files         818      833      +15     
  Lines       25703    26114     +411     
==========================================
+ Hits        22272    22662     +390     
- Misses       3431     3452      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

"CLI": "https://www.trendmicro.com/cloudoneconformity-staging/knowledge-base/aws/DocumentDB/encryption-enabled.html#",
"NativeIaC": "https://www.trendmicro.com/cloudoneconformity-staging/knowledge-base/aws/DocumentDB/encryption-enabled.html#",
"Other": "",
"Terraform": "https://www.trendmicro.com/cloudoneconformity-staging/knowledge-base/aws/DocumentDB/encryption-enabled.html#"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"Terraform": "https://www.trendmicro.com/cloudoneconformity-staging/knowledge-base/aws/DocumentDB/encryption-enabled.html#"
"Terraform": "https://docs.prowler.com/checks/aws/general-policies/bc_aws_general_28/"

"RelatedUrl": "https://docs.aws.amazon.com/securityhub/latest/userguide/documentdb-controls.html#documentdb-1",
"Remediation": {
"Code": {
"CLI": "https://www.trendmicro.com/cloudoneconformity-staging/knowledge-base/aws/DocumentDB/encryption-enabled.html#",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"CLI": "https://www.trendmicro.com/cloudoneconformity-staging/knowledge-base/aws/DocumentDB/encryption-enabled.html#",
"CLI": "https://docs.prowler.com/checks/aws/general-policies/bc_aws_general_28/",

@@ -0,0 +1,30 @@
{
"Provider": "aws",
"CheckID": "documentdb_cluster_c_log_export",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"CheckID": "documentdb_cluster_c_log_export",
"CheckID": "documentdb_cluster_cloudwatch_log_export",

Comment on lines 21 to 22
cluster.backup_retention_period > 0
and cluster.backup_retention_period < 7
Copy link
Member

Choose a reason for hiding this comment

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

Could you put this as a configurable variable, please?

Copy link
Member

@sergargar sergargar left a comment

Choose a reason for hiding this comment

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

Thank you @sansns ! Please, check my comments.

@sansns
Copy link
Contributor Author

sansns commented Jun 24, 2024

Addressed all the comments.

@sergargar sergargar merged commit af29570 into prowler-cloud:master Jun 24, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider/aws Issues/PRs related with the AWS provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants