Trivy scan detected 0 files - Helm #5919
Replies: 5 comments 6 replies
-
the |
Beta Was this translation helpful? Give feedback.
-
Hello @a-devops-guy
Looks like Trivy found helm files.
But, if i understand correctly, Trivy didn't find configuration issues for these files. @nikpivkin can you take a look? |
Beta Was this translation helpful? Give feedback.
-
Hi @a-devops-guy ! I see that in the I am getting the following error when validating chart: helm lint test
==> Linting test
...
[ERROR] templates/: template: test/templates/deployment.yaml:1:4: executing "test/templates/deployment.yaml" at <include "deployment" .>: error calling include: template: test/templates/_helper.tpl:5:11: executing "deployment" at <include "tpl.resource.name" .>: error calling include: template: no template "tpl.resource.name" associated with template "gotpl"
Error: 1 chart(s) linted, 1 chart(s) failed |
Beta Was this translation helpful? Give feedback.
-
@simar7 I investigated and found that in trivy-iac, templates rendering returns the following error: The output if I remove the constraint: templates/deployment.yaml (helm)
Tests: 152 (SUCCESSES: 138, FAILURES: 14, EXCEPTIONS: 0)
Failures: 14 (UNKNOWN: 0, LOW: 9, MEDIUM: 4, HIGH: 1, CRITICAL: 0) |
Beta Was this translation helpful? Give feedback.
-
Track #6337 |
Beta Was this translation helpful? Give feedback.
-
Description
Trivy is detecting 0 files when performing scan if tpllib is used to generate set of resources like deployment, services etc
yaml renders works just fine as well as helm install
happy to provide more example or our full helm library on request.
Desired Behavior
trivy should scan helm chart even when chart is highly templated. scanning the templated yaml file using helm template works fine
Actual Behavior
trivy should scan detects 0 files when helm chart is highly templated.
Reproduction Steps
helm create test
trivy config . --debug
Target
None
Scanner
None
Output Format
None
Mode
None
Debug Output
Operating System
Mac sonoma, Redhat ubi9 container image
Version
Checklist
trivy image --reset
Beta Was this translation helpful? Give feedback.
All reactions