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(terraform): add CKV_AWS_375, CKV_AWS_376, CKV_AWS_377 to add three new SageMaker checks #6732

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

braidoa
Copy link

@braidoa braidoa commented Sep 25, 2024

User description

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

Description

I've added three checks for Amazon SageMaker attributes.

New/Edited policies (Delete if not relevant)

id = "CKV_AWS_375"
name = "Ensure Amazon SageMaker endpoint has a name specified"

id = "CKV_AWS_376"
name = "Ensure Amazon SageMaker endpoint configuration has at least one production variant specified"

id = "CKV_AWS_377"
name = "Ensure Amazon SageMaker notebook instances use lifecycle configurations"

Description

Violations in each rule will occur when a SageMaker resource is missing the respective attribute.

Fix

Someone can fix these issues by specifying the attributes.

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

Dear maintainer, below is a concise technical summary of the changes proposed in this PR:

Introduce three new checks for Amazon SageMaker resources in Terraform. The SagemakerEndpointConfigurationEndpointNameSpecified class ensures that SageMaker endpoints have a name specified, while the SagemakerEndpointConfigurationProductionVariantsSpecified class checks for at least one production variant in the endpoint configuration. Additionally, the SagemakerNotebookLifecycleConfigSpecified class verifies that SageMaker notebook instances use lifecycle configurations. These checks are implemented in the checkov library and are accompanied by corresponding test cases to validate their functionality.

TopicDetails
Lifecycle Config Check Check SageMaker notebooks use lifecycle configurations.
Modified files (2)
  • tests/terraform/checks/resource/aws/example_SagemakerNotebookLifecycleConfigSpecified/main.tf
  • checkov/terraform/checks/resource/aws/SagemakerNotebookLifecycleConfigSpecified.py
Latest Contributors(0)
EmailCommitDate
Production Variants Check Verify SageMaker endpoint configurations have production variants.
Modified files (2)
  • checkov/terraform/checks/resource/aws/SagemakerEndpointConfigurationProductionVariantsSpecified.py
  • tests/terraform/checks/resource/aws/example_SagemakerEndpointConfigurationProductionVariantsSpecified/main.tf
Latest Contributors(0)
EmailCommitDate
Endpoint Name Check Ensure SageMaker endpoints have a name specified.
Modified files (2)
  • checkov/terraform/checks/resource/aws/SagemakerEndpointConfigurationNameSpecified.py
  • tests/terraform/checks/resource/aws/example_SagemakerEndpointConfigurationNameSpecified/main.tf
Latest Contributors(0)
EmailCommitDate
This pull request is reviewed by Baz. Join @braidoa and the rest of your team on (Baz).

@braidoa
Copy link
Author

braidoa commented Oct 10, 2024

Hi folks. Is anyone available to review this?

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.

1 participant