Limit hashicorp-tf-password to .tf/.hcl files (#1420)

* Limit hashicorp-tf-password to .tf/.hcl files

* fix tests

---------

Co-authored-by: Becojo <Becojo@users.noreply.github.com>
This commit is contained in:
becojoandBecojo authored and GitHub committed 2024-06-13 11:23:26 -04:00
1 parent 07e1c30592
commit 02808f45d0
3 files changed
+39 -7

No files matched your search

+1
View File
@@ -2105,6 +2105,7 @@ keywords = [
id = "hashicorp-tf-password"
description = "Identified a HashiCorp Terraform password field, risking unauthorized infrastructure configuration and security breaches."
regex = '''(?i)(?:administrator_login_password|password)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}("[a-z0-9=_\-]{8,20}")(?:['|\"|\n|\r|\s|\x60|;]|$)'''
path = '''\.(tf|hcl)$'''
keywords = [
"administrator_login_password","password",
]