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(cli): add --fixable flag to vulnerability cmd #148

Merged
merged 1 commit into from
Jun 11, 2020

Conversation

afiune
Copy link
Contributor

@afiune afiune commented Jun 11, 2020

Adding the ability to display only fixable vulnerabilities by providing
the new flag --fixable.

Example: From a total of 15 vulnerabilities, display only the 5 that are
fixable.

lacework vul report sha256:62dce44a0d2df7e3e3146817cc35681579c15a4ccd2c5d1f0bddb619fdd6dab8 --fixable
                                  CONTAINER IMAGE DETAILS                                 |        VULNERABILITIES
------------------------------------------------------------------------------------------+---------------------------------
    ID          sha256:1f40f2c68a11e338b7eda2264e71546ab1b5d6bc4c458bbd3785fd5efb3fc632   |   SEVERITY   COUNT   FIXABLE
    Digest      sha256:62dce44a0d2df7e3e3146817cc35681579c15a4ccd2c5d1f0bddb619fdd6dab8   | -----------+-------+----------
    Registry    index.docker.io                                                           |   Critical       0         0
    Repository  techallylw/lacework-cli                                                   |   High           0         0
    Size        58.2 MB                                                                   |   Medium         4         1
    Created At  2020-05-04T17:00:00+0000                                                  |   Low            9         4
    Tags        ubuntu-1804                                                               |   Info           2         0
                                                                                          |
-----------------+----------+----------+--------------------------+--------------------------+--------------------------
       CVE       | SEVERITY | PACKAGE  |     CURRENT VERSION      |       FIX VERSION        |   INTRODUCED IN LAYER
-----------------+----------+----------+--------------------------+--------------------------+--------------------------
  CVE-2020-12243 | Medium   | openldap | 2.4.45+dfsg-1ubuntu1.4   | 2.4.45+dfsg-1ubuntu1.5   | apt-get install curl -y
-----------------+----------+----------+--------------------------+--------------------------+--------------------------
  CVE-2019-1563  | Low      | openssl  | 1.1.1-1ubuntu2.1~18.04.5 | 1.1.1-1ubuntu2.1~18.04.6 | apt-get install curl -y
-----------------+----------+----------+--------------------------+--------------------------+--------------------------
  CVE-2019-1547  | Low      | openssl  | 1.1.1-1ubuntu2.1~18.04.5 | 1.1.1-1ubuntu2.1~18.04.6 | apt-get install curl -y
-----------------+----------+----------+--------------------------+--------------------------+--------------------------
  CVE-2019-1551  | Low      | openssl  | 1.1.1-1ubuntu2.1~18.04.5 | 1.1.1-1ubuntu2.1~18.04.6 | apt-get install curl -y
-----------------+----------+----------+--------------------------+--------------------------+--------------------------
  CVE-2019-1549  | Low      | openssl  | 1.1.1-1ubuntu2.1~18.04.5 | 1.1.1-1ubuntu2.1~18.04.6 | apt-get install curl -y
-----------------+----------+----------+--------------------------+--------------------------+--------------------------

GH: #126

Signed-off-by: Salim Afiune Maya [email protected]

Adding the ability to display only fixable vulnerabilities by providing
the new flag `--fixable`.

Example: From a total of 15 vulnerabilities, display only the 5 that are
fixable.
```
lacework vul report sha256:62dce44a0d2df7e3e3146817cc35681579c15a4ccd2c5d1f0bddb619fdd6dab8 --fixable
                                  CONTAINER IMAGE DETAILS                                 |        VULNERABILITIES
------------------------------------------------------------------------------------------+---------------------------------
    ID          sha256:1f40f2c68a11e338b7eda2264e71546ab1b5d6bc4c458bbd3785fd5efb3fc632   |   SEVERITY   COUNT   FIXABLE
    Digest      sha256:62dce44a0d2df7e3e3146817cc35681579c15a4ccd2c5d1f0bddb619fdd6dab8   | -----------+-------+----------
    Registry    index.docker.io                                                           |   Critical       0         0
    Repository  techallylw/lacework-cli                                                   |   High           0         0
    Size        58.2 MB                                                                   |   Medium         4         1
    Created At  2020-05-04T17:00:00+0000                                                  |   Low            9         4
    Tags        ubuntu-1804                                                               |   Info           2         0
                                                                                          |
-----------------+----------+----------+--------------------------+--------------------------+--------------------------
       CVE       | SEVERITY | PACKAGE  |     CURRENT VERSION      |       FIX VERSION        |   INTRODUCED IN LAYER
-----------------+----------+----------+--------------------------+--------------------------+--------------------------
  CVE-2020-12243 | Medium   | openldap | 2.4.45+dfsg-1ubuntu1.4   | 2.4.45+dfsg-1ubuntu1.5   | apt-get install curl -y
-----------------+----------+----------+--------------------------+--------------------------+--------------------------
  CVE-2019-1563  | Low      | openssl  | 1.1.1-1ubuntu2.1~18.04.5 | 1.1.1-1ubuntu2.1~18.04.6 | apt-get install curl -y
-----------------+----------+----------+--------------------------+--------------------------+--------------------------
  CVE-2019-1547  | Low      | openssl  | 1.1.1-1ubuntu2.1~18.04.5 | 1.1.1-1ubuntu2.1~18.04.6 | apt-get install curl -y
-----------------+----------+----------+--------------------------+--------------------------+--------------------------
  CVE-2019-1551  | Low      | openssl  | 1.1.1-1ubuntu2.1~18.04.5 | 1.1.1-1ubuntu2.1~18.04.6 | apt-get install curl -y
-----------------+----------+----------+--------------------------+--------------------------+--------------------------
  CVE-2019-1549  | Low      | openssl  | 1.1.1-1ubuntu2.1~18.04.5 | 1.1.1-1ubuntu2.1~18.04.6 | apt-get install curl -y
-----------------+----------+----------+--------------------------+--------------------------+--------------------------
```

GH: #126

Signed-off-by: Salim Afiune Maya <[email protected]>
@afiune afiune added cli Something related to the Lacework CLI feat New feature or request labels Jun 11, 2020
@afiune afiune requested a review from scottford-lw June 11, 2020 22:35
@afiune afiune self-assigned this Jun 11, 2020
Copy link
Contributor

@scottford-lw scottford-lw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@afiune afiune merged commit d649e2a into master Jun 11, 2020
@afiune afiune deleted the afiune/126/add-fixable-flag branch June 11, 2020 22:55
@afiune afiune mentioned this pull request Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Something related to the Lacework CLI feat New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants