-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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(terraform): add CKV_AWS_272 to validate Lambda function code-signing #3556
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, good first try 💪
checkov/terraform/checks/resource/aws/LambdaCodeSigningConfigured.py
Outdated
Show resolved
Hide resolved
checkov/terraform/checks/resource/aws/LambdaCodeSigningConfigured.py
Outdated
Show resolved
Hide resolved
from checkov.common.models.enums import CheckResult | ||
|
||
|
||
class TestLambdaCodeSigningConfigured(unittest.TestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you used the wrong style for running the tests, please do something similar like here https://github.com/bridgecrewio/checkov/blob/master/tests/terraform/checks/resource/aws/test_WAFACLCVE202144228.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix please check
…red.py Co-authored-by: Anton Grübel <[email protected]>
Great work! Can you add a description of what the policy is checking for and how to fix a violation of the policy? |
…red.py Co-authored-by: Anton Grübel <[email protected]>
@tsmithv11 where do you want to add this description? |
In the Description of the PR. Just add more detail on what the policy is checking for and why a user should turn on code signing verification. |
Does this description is ok? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice job 🥇
…ning (bridgecrewio#3556) * Add check for lambda code_signing_config_arn * set the code of the check * Update checkov/terraform/checks/resource/aws/LambdaCodeSigningConfigured.py Co-authored-by: Anton Grübel <[email protected]> * Update checkov/terraform/checks/resource/aws/LambdaCodeSigningConfigured.py Co-authored-by: Anton Grübel <[email protected]> * change test to the new style Co-authored-by: Adam Varsano <[email protected]> Co-authored-by: Anton Grübel <[email protected]>
…ning (bridgecrewio#3556) * Add check for lambda code_signing_config_arn * set the code of the check * Update checkov/terraform/checks/resource/aws/LambdaCodeSigningConfigured.py Co-authored-by: Anton Grübel <[email protected]> * Update checkov/terraform/checks/resource/aws/LambdaCodeSigningConfigured.py Co-authored-by: Anton Grübel <[email protected]> * change test to the new style Co-authored-by: Adam Varsano <[email protected]> Co-authored-by: Anton Grübel <[email protected]>
Consider adding switch for image based functions. |
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Description
Validate CKV_AWS_272 to check that lambda resource has code_signing_config_arn.
A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.
Fix
Optimised CKV_AWS_272 to check that lambda resource has code_signing_config_arn
Checklist: