Skip to content

fix(scan): collect a running version of kernel-devel #1044

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

Merged
merged 2 commits into from
Sep 1, 2020

Conversation

kotakanbe
Copy link
Member

@kotakanbe kotakanbe commented Sep 1, 2020

What did you implement:

Vuls only detects vulnerabilities in the running kernel if multiple versions of the kernel are installed.
kernel-devel can also install several different versions on the OS like kernel.
Collect the kernel-devel corresponding to the running kernel.

Running kernel

ubuntu@dev  ~│g│s│g│f│vuls  ⎇ master~  uname -a
Linux dev 4.15.0-99-generic #100-Ubuntu SMP Wed Apr 22 20:32:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linu

kernel devel

[ec2-user@ip-192-168-0-80 ~]$ rpm -qa | grep kernel-devel
kernel-devel-3.10.0-1062.1.2.el7.x86_64
kernel-devel-3.10.0-1127.19.1.el7.x86_64

before

        "kernel": {
            "name": "kernel",
            "version": "3.10.0",
            "release": "1062.1.2.el7",
            "newVersion": "",
            "newRelease": "",
            "arch": "x86_64",
            "repository": "",
            "changelog": {
                "contents": "",
                "method": ""
            }
        },
        "kernel-devel": {
            "name": "kernel-devel",
            "version": "3.10.0",
            "release": "1127.19.1.el7",
            "newVersion": "",
            "newRelease": "",
            "arch": "x86_64",
            "repository": "",
            "changelog": {
                "contents": "",
                "method": ""
            }
        },

after

        "kernel": {
            "name": "kernel",
            "version": "3.10.0",
            "release": "1062.1.2.el7",
            "newVersion": "",
            "newRelease": "",
            "arch": "x86_64",
            "repository": "",
            "changelog": {
                "contents": "",
                "method": ""
            }
        },
        "kernel-devel": {
            "name": "kernel-devel",
            "version": "3.10.0",
            "release": "1062.1.2.el7",
            "newVersion": "",
            "newRelease": "",
            "arch": "x86_64",
            "repository": "",
            "changelog": {
                "contents": "",
                "method": ""
            }
        },

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Scan rhel7 with multiple versions of kernel-devel installed.

Checklist:

You don't have to satisfy all of the following.

  • Write tests
  • Write documentation
  • Check that there aren't other open pull requests for the same issue/feature
  • Format your source code by make fmt
  • Pass the test by make test
  • Provide verification config / commands
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES

@kotakanbe kotakanbe changed the title [WIP]fix(scan): collect a running kernel-devel version [WIP]fix(scan): collect a running version of kernel-devel Sep 1, 2020
@kotakanbe kotakanbe merged commit 4f1578b into master Sep 1, 2020
@kotakanbe kotakanbe changed the title [WIP]fix(scan): collect a running version of kernel-devel fix(scan): collect a running version of kernel-devel Sep 1, 2020
@kotakanbe kotakanbe deleted the fix-kernel-devel branch September 4, 2020 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant