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(misconf): Add Support for skip_final_snapshot in RDS clusters #5147

Closed
simar7 opened this issue Sep 7, 2023 Discussed in #5130 · 1 comment
Closed

feat(misconf): Add Support for skip_final_snapshot in RDS clusters #5147

simar7 opened this issue Sep 7, 2023 Discussed in #5130 · 1 comment
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. scan/misconfiguration Issues relating to misconfiguration scanning
Milestone

Comments

@simar7
Copy link
Member

simar7 commented Sep 7, 2023

Discussed in #5130

Originally posted by dorayakikun September 6, 2023

Description

Abstract

I want to detect some resources which set skip_final_snapshot = true in terraform resources by trivy's custom policy.

Motivation

When destroying an RDS Cluster with Terraform, the backup of the entire cluster is deleted even if the Backup function is enabled.
In the above cases, permanent data loss is risky if recreation is unintentionally performed. (*)

* Automatic backups on cluster deletion have recently been released, but these have not yet been implemented in the terraform aws provider.

https://aws.amazon.com/about-aws/whats-new/2023/08/amazon-aurora-automatic-backup-deleted-clusters/

To avoid this situation, I want to use rego to detect resources with skip_final_snapshot = true.

Proposal

I'm considering creating the below codes.

https://github.com/dorayakikun/defsec/commit/bd9efe9e726d63f9b9f1dcbffa7a12e57f7f154c

Concern

skip_final_snapshot is a particular property.
Adding implementations to AWS Adapters and CloudFormation Adapters makes it difficult.
(I'm concerned that it will always be set to false.)

I am concerned that this violates defsec's design policy.

If you have any other better ideas, please let me know!

Target

AWS

Scanner

Misconfiguration

@simar7 simar7 added kind/feature Categorizes issue or PR as related to a new feature. scan/misconfiguration Issues relating to misconfiguration scanning labels Sep 7, 2023
@simar7 simar7 added this to the v0.46.0 milestone Sep 7, 2023
@simar7 simar7 self-assigned this Sep 19, 2023
@simar7
Copy link
Member Author

simar7 commented Sep 20, 2023

fixed via aquasecurity/defsec#1449

@simar7 simar7 closed this as completed Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. scan/misconfiguration Issues relating to misconfiguration scanning
Projects
Archived in project
Development

No branches or pull requests

1 participant