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

Memcached Disabled rule is not appropriate when you runs an ElasticCache Redis Cluster #5855

Closed
aminvielledebatAtBedrock opened this issue Sep 29, 2022 · 4 comments · Fixed by #5952
Labels
bug Something isn't working community Community contribution

Comments

@aminvielledebatAtBedrock
Copy link

aminvielledebatAtBedrock commented Sep 29, 2022

Following the documentation here, elasticache engine can be redis or memcached.

Therefore, there is no reason to keep the rule 4bd15dd9-8d5e-4008-8532-27eb0c3706d3 | Medium activated.

Can you remove this rule, or give us any information to fix it ?

Expected Behavior

No warning in kics scans.

Actual Behavior

Terraform example :

resource "aws_elasticache_cluster" "my_test_cluster" {
  cluster_id           = "my_cluster_id"
  engine               = "redis"
  node_type            = "cache.t4.small"
  num_cache_nodes      = 1
  parameter_group_name = "default.redis5.0"
  engine_version       = "5.0.0"
  port                 = 6379
}

Kics logs :

Memcached Disabled, Severity: MEDIUM, Results: 1
Description: Check if the Memcached is disabled on the ElastiCache
Platform: Terraform

	[1]: ../../path/.cloud/terraform/test.tf:3

		002:   cluster_id           = "my_cluster_id"
		003:   engine               = "redis"
		004:   node_type            = "cache.t4.small"

Steps to Reproduce the Problem

Run kicks on your terraform test file with the following command :

docker run --rm -it -v /home/aminvielle/projects/kics:/bedrock-kics -v /home/aminvielle/projects/my-project:/path checkmarx/kics:v1.6.0 scan -p /path/.cloud/terraform --config /bedrock-kics/kics-config.yaml --queries-path ./assets/queries --queries-path /bedrock-kics/assets/queries/terraform/aws -o /path -v
@aminvielledebatAtBedrock aminvielledebatAtBedrock added bug Something isn't working community Community contribution labels Sep 29, 2022
@aminvielledebatAtBedrock
Copy link
Author

duplicate of #3909

@rafaela-soares
Copy link
Contributor

Hello @aminvielledebatAtBedrock

Thank you so much for bringing up this thread again. We will contact our AppSec team to take a look. As soon as we get a decision, we will let you know 😊

@rafaela-soares
Copy link
Contributor

Meanwhile, you can use the flag --exclude-queries to exclude this query.

@rafaela-soares
Copy link
Contributor

Hello again, @aminvielledebatAtBedrock

We changed the query approach in PR #5952. The query was implementing the wrong approach, maybe because of a misunderstanding during the development and review of it.

ElastiCache should have Redis enabled, since it covers Compliance Certifications such as FedRAMP, HIPAA, and PCI DSS. For more information, take a look at 'https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/SelectEngine.html'

Since Memcached it’s not compliant with PCI DSS, the query will now look for engine defined as 'memcached'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community Community contribution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants