[fast-lane] feat: add CKV_AWS_394 - Ensure DynamoDB table has deletion protection enabled - #7626
Open
SatyamJadhav007 wants to merge 1 commit into
Open
Conversation
SatyamJadhav007
had a problem deploying
to
scan-security
July 27, 2026 10:56 — with
GitHub Actions
Failure
This was referenced Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds
CKV_AWS_394— a check that ensuresaws_dynamodb_tableresources havedeletion_protection_enabledset totrue.DynamoDB already has checkov coverage for encryption (
CKV_AWS_119), point-in-time recovery (CKV_AWS_28,CKV_AWS_165), and replica CMK usage (CKV_AWS_271), but there was no check for deletion protection. Since DynamoDB tables often hold critical application state, accidental or unauthorized deletion without this flag enabled can result in irreversible data loss. AWS has supporteddeletion_protection_enabledonaws_dynamodb_tablesince Terraform AWS provider v4.55.The check follows the
BaseResourceValueCheckpattern (same structure asRDSDeletionProtection/CKV_AWS_139).Tests
Three scenarios covered using
hcl2.loads()per the contribution guidelines:deletion_protection_enabled = true→ PASSdeletion_protection_enabled = false→ FAILAll tests pass locally and flake8 reports no errors.
Checklist
BaseResourceValueCheckpatternhcl2.loads()per contribution guidelines