forked from Checkmarx/kics
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(query): "name is not snake case" should check only resource names (…
…Checkmarx#4346) Signed-off-by: Rogério Peixoto <[email protected]>
- Loading branch information
1 parent
3a57982
commit 8fcedec
Showing
4 changed files
with
61 additions
and
14 deletions.
There are no files selected for viewing
29 changes: 23 additions & 6 deletions
29
assets/queries/terraform/general/name_is_not_snake_case/query.rego
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
assets/queries/terraform/general/name_is_not_snake_case/test/positive2.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
variable "cluster_name" { | ||
default = "example" | ||
description = "cluster name" | ||
type = string | ||
} | ||
|
||
resource "aws_eks_cluster" "positive2" { | ||
depends_on = [aws_cloudwatch_log_group.example] | ||
|
||
enabled_cluster_log_types = ["api", "audit", "authenticator", "controllerManager", "scheduler"] | ||
name = var.cluster_name | ||
} | ||
|
||
module "ACMPositive2" { | ||
source = "git::https://example.com/vpc.git?ref=v1.2.0" | ||
version = "~> v2.0" | ||
domain_name = var.site_domain | ||
zone_id = data.aws_route53_zone.this.zone_id | ||
tags = var.tags | ||
|
||
providers = { | ||
aws = "aws.us_east_1" # cloudfront needs acm certificate to be from "us-east-1" region | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters