Skip to content

Commit

Permalink
fix(passwords and secrets): excluded TF file function reference in re…
Browse files Browse the repository at this point in the history
…sults #4433
  • Loading branch information
rafaela-soares authored Nov 2, 2021
1 parent 072bc68 commit 2f3c7c9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions assets/queries/common/passwords_and_secrets/regex_rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,10 @@
{
"description": "Avoiding arn",
"regex": "(?i)['\"]?[a-zA-Z_]+['\"]?\\s*[=:]\\s*['\"]?(arn:)['\"]?"
},
{
"description": "Avoiding TF file function",
"regex": "(?i)['\"]?[a-zA-Z_]+['\"]?\\s*=\\s*['\"]?(file\\()['\"]?"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
resource "aws_instance" "instance" {
ami = data.aws_ami.ubuntu.id
instance_type = "t3.micro"

connection {
user = "ubuntu"
private_key = file(var.private_key_path)
}
}

0 comments on commit 2f3c7c9

Please sign in to comment.