mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-12 07:40:48 -08:00
fix(misconf): respect .yml files when Helm charts are detected (#9912)
Signed-off-by: nikpivkin <nikita.pivkin@smartforce.io>
This commit is contained in:
@@ -16,7 +16,7 @@ Trivy scans Infrastructure as Code (IaC) files for
|
||||
| [Terraform Plan](terraform.md) | tfplan, \*.tfplan, \*.json |
|
||||
| [CloudFormation](cloudformation.md) | \*.yml, \*.yaml, \*.json |
|
||||
| [Azure ARM Template](azure-arm.md) | \*.json |
|
||||
| [Helm](helm.md) | \*.yaml, \*.tpl, \*.tar.gz, etc. |
|
||||
| [Helm](helm.md) | \*.yml, \*.yaml, \*.tpl, \*.tar.gz, etc. |
|
||||
| [YAML][json-and-yaml] | \*.yaml, \*.yml |
|
||||
| [JSON][json-and-yaml] | \*.json |
|
||||
| [Ansible](ansible.md) | \*.yml, \*.yaml, \*.json, \*.ini, without extension |
|
||||
|
||||
@@ -193,7 +193,7 @@ func init() {
|
||||
return true
|
||||
}
|
||||
}
|
||||
helmFileExtensions := []string{".yaml", ".tpl"}
|
||||
helmFileExtensions := []string{".yml", ".yaml", ".tpl"}
|
||||
ext := filepath.Ext(filepath.Base(name))
|
||||
for _, expected := range helmFileExtensions {
|
||||
if strings.EqualFold(ext, expected) {
|
||||
|
||||
@@ -246,6 +246,7 @@ Resources:
|
||||
r: nil,
|
||||
expected: []FileType{
|
||||
FileTypeYAML,
|
||||
FileTypeHelm,
|
||||
FileTypeAnsible,
|
||||
},
|
||||
},
|
||||
@@ -276,6 +277,7 @@ spec:
|
||||
expected: []FileType{
|
||||
FileTypeKubernetes,
|
||||
FileTypeYAML,
|
||||
FileTypeHelm,
|
||||
FileTypeAnsible,
|
||||
},
|
||||
},
|
||||
@@ -342,6 +344,7 @@ spec:
|
||||
r: nil,
|
||||
expected: []FileType{
|
||||
FileTypeYAML,
|
||||
FileTypeHelm,
|
||||
FileTypeAnsible,
|
||||
},
|
||||
},
|
||||
@@ -351,6 +354,7 @@ spec:
|
||||
r: nil,
|
||||
expected: []FileType{
|
||||
FileTypeYAML,
|
||||
FileTypeHelm,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -384,6 +388,7 @@ data:
|
||||
expected: []FileType{
|
||||
FileTypeKubernetes,
|
||||
FileTypeYAML,
|
||||
FileTypeHelm,
|
||||
FileTypeAnsible,
|
||||
},
|
||||
},
|
||||
@@ -413,6 +418,7 @@ rules:
|
||||
expected: []FileType{
|
||||
FileTypeKubernetes,
|
||||
FileTypeYAML,
|
||||
FileTypeHelm,
|
||||
FileTypeAnsible,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user