checkov icon indicating copy to clipboard operation
checkov copied to clipboard

Helm Chart issues have wrong `repo_file_path` in report

Open lolgab opened this issue 2 years ago • 3 comments

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",

lolgab avatar Mar 29 '22 11:03 lolgab

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!

stale[bot] avatar Sep 25 '22 13:09 stale[bot]

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!

stale[bot] avatar Oct 09 '22 17:10 stale[bot]

Implemented the fix in https://github.com/bridgecrewio/checkov/pull/4044

srinivasakartheek avatar Dec 12 '22 01:12 srinivasakartheek

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!

stale[bot] avatar Jun 10 '23 11:06 stale[bot]

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!

stale[bot] avatar Jun 26 '23 02:06 stale[bot]