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

fix(cloudformation): Handle subs in CKV_AWS_384 #7022

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tsmithv11
Copy link
Collaborator

@tsmithv11 tsmithv11 commented Feb 22, 2025

User description

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

Description

Fixes #7019

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my feature, policy, or fix is effective and works
  • New and existing tests pass locally with my changes

Generated description

Below is a concise technical summary of the changes proposed in this PR:

Modifies the ParameterStoreCredentials check in CloudFormation to handle string substitutions in parameter names. Adds a test case for DynamoDB table name storage in SSM Parameter Store. Updates the regex matching to convert the name to a string, preventing potential crashes.

TopicDetails
Regex fix Modifies the regex matching in ParameterStoreCredentials check to convert name to string, preventing potential crashes with string substitutions.
Modified files (1)
  • checkov/cloudformation/checks/resource/aws/ParameterStoreCredentials.py
Latest Contributors(1)
UserCommitDate
tsmithv11feat-cloudformation-Ad...December 31, 2024
Test updates Adds new test cases for DynamoDB table name storage in SSM Parameter Store and updates the test file for ParameterStoreCredentials.
Modified files (2)
  • tests/cloudformation/checks/resource/aws/test_ParameterStoreCredentials.py
  • tests/cloudformation/checks/resource/aws/example_ParameterStoreCredentials/no_crash.yaml
Latest Contributors(1)
UserCommitDate
tsmithv11feat-cloudformation-Ad...December 31, 2024
This pull request is reviewed by Baz. Join @tsmithv11 and the rest of your team on (Baz).

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.

Checkov crashes on CloudFormation code
2 participants