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

Merged
merged 1 commit into from
Feb 25, 2025
Merged

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).

@tsmithv11 tsmithv11 merged commit 1738ab0 into main Feb 25, 2025
43 of 44 checks passed
@tsmithv11 tsmithv11 deleted the fix-checks-feb25 branch February 25, 2025 08:08
Saarett pushed a commit that referenced this pull request Feb 25, 2025
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
3 participants