snyk / snyk-to-html

export test reports from CLI to html
Other
87 stars 77 forks source link

baseImageRemediation not in html report #160

Open MishaVeldhoen opened 1 year ago

MishaVeldhoen commented 1 year ago

When testing a container (snyk container scan my_image:my_tag --file=Dockerfile --json), the output contains a section with a suggestion for a base image upgrade (example below). This suggestion is one of the most useful parts of the report, however, it doesn't appear in the html report generated by snyk-to-html.

  "docker": {
    "baseImage": "ubuntu:20.04",
    "baseImageRemediation": {
      "code": "REMEDIATION_AVAILABLE",
      "advice": [
        {
          "message": "Base Image    Vulnerabilities  Severity\nubuntu:20.04  12               0 critical, 0 high, 2 medium, 10 low\n"
        },
        {
          "message": "Recommendations for base image upgrade:\n",
          "bold": true
        },
        {
          "message": "Major upgrades",
          "bold": true
        },
        {
          "message": "Base Image      Vulnerabilities  Severity\nubuntu:kinetic  9                0 critical, 0 high, 2 medium, 7 low\n"
        }
      ]
    },
    "binariesVulns": {
      "issuesData": {},
      "affectedPkgs": {}
    }
  },