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(vuln): support vulnerability status #4867

Merged
merged 10 commits into from
Jul 26, 2023
Merged

Conversation

knqyf263
Copy link
Collaborator

@knqyf263 knqyf263 commented Jul 24, 2023

Description

The detail is described in #4763.

  • Display the status in table/json.
  • Add --ignore-status
    • e.g. trivy image --ignore-status will_not_fix centos:7

Before

centos:7 (centos 7.9.2009)
==========================
Total: 1026 (UNKNOWN: 0, LOW: 565, MEDIUM: 455, HIGH: 6, CRITICAL: 0)

┌─────────────────────────────┬──────────────────┬──────────┬───────────────────────┬──────────────────────────┬──────────────────────────────────────────────────────────────┐
│           Library           │  Vulnerability   │ Severity │   Installed Version   │      Fixed Version       │                            Title                             │
├─────────────────────────────┼──────────────────┼──────────┼───────────────────────┼──────────────────────────┼──────────────────────────────────────────────────────────────┤
│ audit-libs                  │ CVE-2015-5186    │ MEDIUM   │ 2.8.5-4.el7           │                          │ log terminal emulator escape sequences handling              │
│                             │                  │          │                       │                          │ https://avd.aquasec.com/nvd/cve-2015-5186                    │
├─────────────────────────────┼──────────────────┤          ├───────────────────────┼──────────────────────────┼──────────────────────────────────────────────────────────────┤
│ bash                        │ CVE-2012-6711    │          │ 4.2.46-34.el7         │                          │ bash: heap-based buffer overflow during echo of unsupported  │
│                             │                  │          │                       │                          │ characters                                                   │
│                             │                  │          │                       │                          │ https://avd.aquasec.com/nvd/cve-2012-6711                    │
│                             ├──────────────────┼──────────┤                       ├──────────────────────────┼──────────────────────────────────────────────────────────────┤
│                             │ CVE-2019-18276   │ LOW      │                       │                          │ bash: when effective UID is not equal to its real UID the... │
│                             │                  │          │                       │                          │ https://avd.aquasec.com/nvd/cve-2019-18276                   │
├─────────────────────────────┼──────────────────┼──────────┼───────────────────────┼──────────────────────────┼──────────────────────────────────────────────────────────────┤
│ bind-license                │ CVE-2020-8625    │ HIGH     │ 32:9.11.4-26.P2.el7   │ 32:9.11.4-26.P2.el7_9.4  │ bind: Buffer overflow in the SPNEGO implementation affecting │
│                             │                  │          │                       │                          │ GSSAPI security policy negotiation...                        │
│                             │                  │          │                       │                          │ https://avd.aquasec.com/nvd/cve-2020-8625                    │
│                             ├──────────────────┤          │                       ├──────────────────────────┼──────────────────────────────────────────────────────────────┤

After

centos:7 (centos 7.9.2009)
==========================
Total: 1026 (UNKNOWN: 0, LOW: 564, MEDIUM: 456, HIGH: 6, CRITICAL: 0)

┌─────────────────────────────┬──────────────────┬──────────┬─────────────────────┬───────────────────────┬──────────────────────────┬──────────────────────────────────────────────────────────────┐
│           Library           │  Vulnerability   │ Severity │       Status        │   Installed Version   │      Fixed Version       │                            Title                             │
├─────────────────────────────┼──────────────────┼──────────┼─────────────────────┼───────────────────────┼──────────────────────────┼──────────────────────────────────────────────────────────────┤
│ audit-libs                  │ CVE-2015-5186    │ MEDIUM   │ will_not_fix        │ 2.8.5-4.el7           │                          │ log terminal emulator escape sequences handling              │
│                             │                  │          │                     │                       │                          │ https://avd.aquasec.com/nvd/cve-2015-5186                    │
├─────────────────────────────┼──────────────────┤          │                     ├───────────────────────┼──────────────────────────┼──────────────────────────────────────────────────────────────┤
│ bash                        │ CVE-2012-6711    │          │                     │ 4.2.46-34.el7         │                          │ bash: heap-based buffer overflow during echo of unsupported  │
│                             │                  │          │                     │                       │                          │ characters                                                   │
│                             │                  │          │                     │                       │                          │ https://avd.aquasec.com/nvd/cve-2012-6711                    │
│                             ├──────────────────┼──────────┤                     │                       ├──────────────────────────┼──────────────────────────────────────────────────────────────┤
│                             │ CVE-2019-18276   │ LOW      │                     │                       │                          │ bash: when effective UID is not equal to its real UID the... │
│                             │                  │          │                     │                       │                          │ https://avd.aquasec.com/nvd/cve-2019-18276                   │
├─────────────────────────────┼──────────────────┼──────────┼─────────────────────┼───────────────────────┼──────────────────────────┼──────────────────────────────────────────────────────────────┤
│ bind-license                │ CVE-2020-8625    │ HIGH     │ fixed               │ 32:9.11.4-26.P2.el7   │ 32:9.11.4-26.P2.el7_9.4  │ bind: Buffer overflow in the SPNEGO implementation affecting │
│                             │                  │          │                     │                       │                          │ GSSAPI security policy negotiation...                        │
│                             │                  │          │                     │                       │                          │ https://avd.aquasec.com/nvd/cve-2020-8625                    │
│                             ├──────────────────┤          │                     │                       ├──────────────────────────┼──────────────────────────────────────────────────────────────┤
│                             │ CVE-2021-25215   │          │                     │                       │ 32:9.11.4-26.P2.el7_9.5  │ bind: An assertion check can fail while answering queries    │
│                             │                  │          │                     │                       │                          │ for DNAME records...                                         │
│                             │                  │          │                     │                       │                          │ https://avd.aquasec.com/nvd/cve-2021-25215                   │
│                             ├──────────────────┤          │                     │                       ├──────────────────────────┼──────────────────────────────────────────────────────────────┤
│                             │ CVE-2022-38177   │          │                     │                       │ 32:9.11.4-26.P2.el7_9.10 │ bind: memory leak in ECDSA DNSSEC verification code          │
│                             │                  │          │                     │                       │                          │ https://avd.aquasec.com/nvd/cve-2022-38177                   │
│                             ├──────────────────┤          │                     │                       │                          ├──────────────────────────────────────────────────────────────┤
│                             │ CVE-2022-38178   │          │                     │                       │                          │ bind: memory leaks in EdDSA DNSSEC verification code         │
│                             │                  │          │                     │                       │                          │ https://avd.aquasec.com/nvd/cve-2022-38178                   │
│                             ├──────────────────┤          ├─────────────────────┤                       ├──────────────────────────┼──────────────────────────────────────────────────────────────┤
│                             │ CVE-2023-2828    │          │ affected            │                       │                          │ named's configured cache size limit can be significantly     │
│                             │                  │          │                     │                       │                          │ exceeded                                                     │
│                             │                  │          │                     │                       │                          │ https://avd.aquasec.com/nvd/cve-2023-2828                    │
│                             ├──────────────────┼──────────┼─────────────────────┤                       ├──────────────────────────┼──────────────────────────────────────────────────────────────┤

Related issues

Related PRs

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

@knqyf263 knqyf263 self-assigned this Jul 24, 2023
@knqyf263 knqyf263 changed the title feat: support vulnerability status feat(vuln): support vulnerability status Jul 24, 2023
@knqyf263 knqyf263 added the scan/vulnerability Issues relating to vulnerability scanning label Jul 24, 2023
@knqyf263
Copy link
Collaborator Author

knqyf263 commented Jul 25, 2023

@itaysk @AnaisUrlichs Could you take a quick look at the document? The source code should be ok as Dmitriy and I cross-review changes.
It is marked as a draft so I won't forget to remove replace in go.mod, but it is ready for review.

@knqyf263 knqyf263 marked this pull request as ready for review July 26, 2023 11:40
@knqyf263 knqyf263 added this pull request to the merge queue Jul 26, 2023
Merged via the queue into aquasecurity:main with commit 232ba82 Jul 26, 2023
21 checks passed
@knqyf263 knqyf263 deleted the status branch July 26, 2023 12:20
AnaisUrlichs pushed a commit to AnaisUrlichs/trivy that referenced this pull request Aug 10, 2023
* feat: support vulnerability status

* feat: show status in table

* don't add `fixed` status in debian/redhat

* update test golden files

* add Status in rpc

* update docs

* update ignore-status example

* add ignore-status in integration test

* docs: add the explanation for statuses

---------

Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scan/vulnerability Issues relating to vulnerability scanning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more detailed vulnerability status on unfixed vulnerabilities
3 participants