Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-60179

Plugin JSON format to match anchore-cli JSONs format

    • v1.0.21

      Hi,

      While working with the Anchore plugin, I realized that the JSON format of the artifacts saved was not maching the "anchore-cli --json" one.

      While I understand the current format is used to be able to display the reports within Jenkins, maybe adding a couple other artifacts would be nice, such as for :

      $ anchore-cli --json evaluate check docker.io/xyz/image:latest --detail
      $ anchore-cli --json image vuln docker.io/xyz/image:latest all

      results would be added to the artifacts saved.

      It would be really nice to have both on-par, in order to be able to use them interchangeably with whatever automation needs that could come up (as I do).

      Cheers.
      fred

      cc nurmi

          [JENKINS-60179] Plugin JSON format to match anchore-cli JSONs format

          Hello fblaise, you are right about the use of the artifacts generated by the anchore plugin - its mainly to render the reports and the data format was what the good old anchore tool output (precursor to anchore engine and now almost deprecated). The plugin actually works off of the same data you get from anchore-cli --json option but mangles it in order to be compatible with the rendering aspect. We've been meaning to switch it to be consistent but haven't had a chance to get to it. I can put in a fix to generate additional artifacts with data in the same format as you'd expect from the api (or anchore-cli --json option). Does that work for you?

          Swathi Gangisetty added a comment - Hello  fblaise , you are right about the use of the artifacts generated by the anchore plugin - its mainly to render the reports and the data format was what the good old anchore tool output (precursor to anchore engine and now almost deprecated). The plugin actually works off of the same data you get from anchore-cli --json option but mangles it in order to be compatible with the rendering aspect. We've been meaning to switch it to be consistent but haven't had a chance to get to it. I can put in a fix to generate additional artifacts with data in the same format as you'd expect from the api (or anchore-cli --json option). Does that work for you?

          Fred Blaise added a comment -

          It would be great! Thanks

          Fred Blaise added a comment - It would be great! Thanks

          Swathi Gangisetty added a comment - - edited

          Fixed in release v1.0.21 by GitHub PR 8

          Swathi Gangisetty added a comment - - edited Fixed in release v1.0.21 by GitHub PR 8

            swathigangisetty Swathi Gangisetty
            fblaise Fred Blaise
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: