checkov
checkov copied to clipboard
Helm Chart issues have wrong `repo_file_path` in report
Describe the issue
Checks relying on Helm (like CKV_K8S_38
) don't return a correct repo_file_path
.
What they return is some invented path which seems to be build from the concatenation of
the name
field in Chart.yaml
and the actual filename.
Examples Using this example: https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-to-sd
The expected file path for an issue in templates/deployment.yaml
is /templates/deployment.yaml
.
What I get is ../tmp/tmpjr32d99d/prometheus-to-sd/templates/deployment.yaml
where prometheus-to-sd
is taken from the chart name
Version:
- Checkov Version 2.0.399
Additional context Other paths in the report are wrong as well:
"file_path": "/prometheus-to-sd/templates/deployment.yaml",
"file_abs_path": "/tmp/tmpyhnqvylp/prometheus-to-sd/templates/deployment.yaml",
"repo_file_path": "/../tmp/tmpyhnqvylp/prometheus-to-sd/templates/deployment.yaml",
Thanks for contributing to Checkov! We've automatically marked this issue as stale to keep our issues list tidy, because it has not had any activity for 6 months. It will be closed in 14 days if no further activity occurs. Commenting on this issue will remove the stale tag. If you want to talk through the issue or help us understand the priority and context, feel free to add a comment or join us in the Checkov slack channel at https://slack.bridgecrew.io Thanks!
Closing issue due to inactivity. If you feel this is in error, please re-open, or reach out to the community via slack: https://slack.bridgecrew.io Thanks!
Implemented the fix in https://github.com/bridgecrewio/checkov/pull/4044
Thanks for contributing to Checkov! We've automatically marked this issue as stale to keep our issues list tidy, because it has not had any activity for 6 months. It will be closed in 14 days if no further activity occurs. Commenting on this issue will remove the stale tag. If you want to talk through the issue or help us understand the priority and context, feel free to add a comment or join us in the Checkov slack channel at https://slack.bridgecrew.io Thanks!
Closing issue due to inactivity. If you feel this is in error, please re-open, or reach out to the community via slack: https://slack.bridgecrew.io Thanks!