-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(queries): Fixed aws unique identifiers from common queries (#5236)
* separated ids Signed-off-by: joaorufi <[email protected]> * added positive41 sample Signed-off-by: joaorufi <[email protected]>
- Loading branch information
Showing
3 changed files
with
61 additions
and
11 deletions.
There are no files selected for viewing
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
28 changes: 28 additions & 0 deletions
28
assets/queries/common/passwords_and_secrets/test/positive41.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,28 @@ | ||
resource "aws_instance" "web_host" { | ||
# ec2 have plain text secrets in user data | ||
ami = var.ami | ||
instance_type = "t2.nano" | ||
|
||
vpc_security_group_ids = [ | ||
"${aws_security_group.web-node.id}"] | ||
subnet_id = aws_subnet.web_subnet.id | ||
user_data = <<EOF | ||
#! /bin/bash | ||
sudo apt-get update | ||
sudo apt-get install -y apache2 | ||
sudo systemctl start apache2 | ||
sudo systemctl enable apache2 | ||
export AWS_CONTEXT_CREDENTIAL=ACCAIOSFODNN7EXAMAAA | ||
export AWS_CERTIFICATE=ASCAIOSFODNN7EXAMAAA | ||
export AWS_DEFAULT_REGION=us-west-2 | ||
echo "<h1>Deployed via Terraform</h1>" | sudo tee /var/www/html/index.html | ||
EOF | ||
tags = merge({ | ||
Name = "${local.resource_prefix.value}-ec2" | ||
}, { | ||
git_last_modified_by = "[email protected]" | ||
git_modifiers = "felipe.avelar" | ||
git_org = "checkmarx" | ||
git_repo = "kics" | ||
}) | ||
} |
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