Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: understand vuln reports with 0 vulnerabilities #123

Closed
afiune opened this issue May 29, 2020 · 0 comments · Fixed by #124
Closed

feat: understand vuln reports with 0 vulnerabilities #123

afiune opened this issue May 29, 2020 · 0 comments · Fixed by #124
Assignees
Labels
feat New feature or request

Comments

@afiune
Copy link
Contributor

afiune commented May 29, 2020

The Lacework API is now returning vulnerability reports that contain
0 vulnerabilities, we need to make the Go API and the CLI to understand
those payloads and display a message to the user that explains that the
report has no vulnerabilities, if we visualize a report with 0 vulnerabilities
today, the output looks like this:

$ lacework vulnerability report sha256:d8a573f7ba9ea2c196f13b6e71ba0aeefe715f69bf8291c155ff7dfe9bc2ec2f --image_id

  CONTAINER IMAGE DETAILS |        VULNERABILITIES
--------------------------+---------------------------------
    ID                    |   SEVERITY   COUNT   FIXABLE
    Digest                | -----------+-------+----------
    Registry              |   Critical       0         0
    Repository            |   High           0         0
    Size        0 B       |   Medium         0         0
    Created At            |   Low            0         0
    Tags                  |   Info           0         0
                          |
Try using '--details' to increase details shown about the vulnerability report.

The proposal output to show to the end-user is:

$ lacework vulnerability report sha256:d8a573f7ba9ea2c196f13b6e71ba0aeefe715f69bf8291c155ff7dfe9bc2ec2f --image_id
Great news! This container image has no vulnerabilities.

The JSON output should match the following:

$ lacework vulnerability report sha256:d8a573f7ba9ea2c196f13b6e71ba0aeefe715f69bf8291c155ff7dfe9bc2ec2f --image_id --json
{
  "critical_vulnerabilities": 0,
  "fixable_vulnerabilities": 0,
  "high_vulnerabilities": 0,
  "info_vulnerabilities": 0,
  "low_vulnerabilities": 0,
  "medium_vulnerabilities": 0,
  "scan_status": "Success",
  "total_vulnerabilities": 0
}
@afiune afiune added the feat New feature or request label May 29, 2020
@afiune afiune self-assigned this May 29, 2020
@afiune afiune changed the title feat: make the CLI understand vuln reports with 0 vulnerabilities feat: understand vuln reports with 0 vulnerabilities May 29, 2020
afiune added a commit that referenced this issue May 29, 2020
Make the Go API and the CLI to understand new payloads from the vuln
reports API endpoints that displays reports with 0 vulnerabilities,
we are now displaying a message to the user that explains that the
report has no vulnerabilities

The output shown to the end-user is for reports with 0 vulnerabilities:
```
$ lacework vul report sha256:32c5a42735581453d1e9ea664604fa81f4b635459dc88799ee1f8c373dca4819
Great news! This container image has no vulnerabilities.
```

And for the JSON format:
```
$ lacework vul report sha256:32c5a42735581453d1e9ea664604fa81f4b635459dc88799ee1f8c373dca4819 --json
{
  "critical_vulnerabilities": 0,
  "fixable_vulnerabilities": 0,
  "high_vulnerabilities": 0,
  "info_vulnerabilities": 0,
  "low_vulnerabilities": 0,
  "medium_vulnerabilities": 0,
  "scan_status": "Success",
  "total_vulnerabilities": 0
}
```

Closes #123

Signed-off-by: Salim Afiune Maya <afiune@lacework.net>
afiune added a commit that referenced this issue May 29, 2020
Make the Go API and the CLI to understand new payloads from the vuln
reports API endpoints that displays reports with 0 vulnerabilities,
we are now displaying a message to the user that explains that the
report has no vulnerabilities

The output shown to the end-user is for reports with 0 vulnerabilities:
```
$ lacework vul report sha256:32c5a42735581453d1e9ea664604fa81f4b635459dc88799ee1f8c373dca4819
Great news! This container image has no vulnerabilities.
```

And for the JSON format:
```
$ lacework vul report sha256:32c5a42735581453d1e9ea664604fa81f4b635459dc88799ee1f8c373dca4819 --json
{
  "critical_vulnerabilities": 0,
  "fixable_vulnerabilities": 0,
  "high_vulnerabilities": 0,
  "info_vulnerabilities": 0,
  "low_vulnerabilities": 0,
  "medium_vulnerabilities": 0,
  "scan_status": "Success",
  "total_vulnerabilities": 0
}
```

Closes #123

Signed-off-by: Salim Afiune Maya <afiune@lacework.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant