datreeio / datree

Prevent Kubernetes misconfigurations from reaching production (again 😤 )! From code to cloud, Datree provides an E2E policy enforcement solution to run automatic checks for rule violations. See our docs: https://hub.datree.io

Home Page:https://datree.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Verbose message and resolution link not available in reports

aroundthecode opened this issue · comments

Describe the bug
invoking --verbose mode with --output JUnit (or any other then 'simple' ) does not show any link in XML report

To Reproduce
Steps to reproduce the behavior:

  1. from any helm chart folder
  2. helm datree test --verbose .
  3. links are present in output
❌  Ensure each container has a configured CPU limit  [1 occurrence]
    How to fix: https://hub.datree.io/ensure-cpu-limit
    - metadata.name: release-name-test-helm-generic (kind: Deployment)
💡  Missing property object `limits.cpu` - value should be within the accepted boundaries recommended by the organization
  1. helm datree test --verbose --no-record --output JUnit .
  2. Links not present in report
<testcase name="Ensure each container has a configured memory request" classname="CONTAINERS_MISSING_MEMORY_REQUEST_KEY">
                        <failure message="Missing property object `requests.memory` - value should be within the accepted boundaries recommended by the organization">1 occurrences&#xA;- metadata.name: release-name-test-helm-generic (kind: Deployment)&#xA;0 skipped&#xA;</failure>
                </testcase>

Expected behavior
Resolution message and link should be available also in different output format

Desktop (please complete the following information):

  • OS: Linux and Windows

Datree plugin version (run helm datree verion):
1.6.12

This behavior is happening because it's not supported by the CLI.
Therefore, I will move this issue to this project.

@hadar-co don't you have an open issue about that for the sarif output?

This is required for supporting SARIF output and our Github job summary.

Desired solution:
Add the links from the --verbose output to all available output formats (YAML, JSON, xml, JUnit, SARIF)

Resolved in #778