docker / docker/scout-cli

[FEATURE] add `json` format to cves command

Open
#189 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
454
Forks
134
PR merge metrics
No merged PRs in 30d

Description

Currently, there is no machine-readable output format for the cves command that supports listing both the architecture of the image and the fixed_in version of the vulnerability.

While this information is available separately in different formats—for example, architecture is included in the sbom format and fixed_in is available in the sarif format—there is no single format that provides both.

I propose adding a new json output format that includes both fields. This is not a new requirement; tools like Grype and Trivy already support formats that include this information. Even Docker Scout has a packages format that provides these details, although it is in a pretty-printed format and not machine-readable.

Implementing this should not be difficult, as the information is already available internally.

The following are the basic requirements that are expected in a single format:

  • vuln_package
    • name
    • installedVersion
    • fixedVersion
    • vulnerabilityID
  • image:
    • os_type
    • os_version
    • os_arch

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the cves command and inspect the existing sbom and sarif output formats to find where vulnerability and image data are assembled. Add a machine-readable json format containing the requested package fields and image OS, version, and architecture, then verify its output against the stated requirements.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, shell
Domain
cli, security
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.