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!(detector): use vuls2 for redhat/centos/alma/rocky #2075

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

shino
Copy link
Collaborator

@shino shino commented Dec 8, 2024

If this Pull Request is work in progress, Add a prefix of “[WIP]” in the title.

What did you implement:

Use vuls2 detection backend for redhat/centos/alma/rocky.

Fixes # (issue)

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?

Almost manually.
https://github.com/shino/vuls-compare can be used to help testing.

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?: NO

Reference

@shino shino force-pushed the shino/redhat-vuls2 branch 3 times, most recently from 54f374a to 3833859 Compare December 8, 2024 14:54
@shino shino marked this pull request as ready for review December 8, 2024 15:00
@shino shino requested a review from MaineK00n December 8, 2024 15:09
@shino shino changed the title feat!(detector): use vuls2 for redhat/alma/rocky feat!(detector): use vuls2 for redhat/centos/alma/rocky Dec 9, 2024
@shino shino force-pushed the shino/redhat-vuls2 branch from 3833859 to b0aa6d0 Compare December 9, 2024 05:26
@shino shino force-pushed the shino/redhat-vuls2 branch from b0aa6d0 to 6ae360c Compare December 9, 2024 05:50
@shino
Copy link
Collaborator Author

shino commented Dec 9, 2024

testdata.tar.gz

vuls-compare example:

% git clone https://github.com/shino/vuls-compare.git
% git clone https://github.com/MaineK00n/vuls2.git
% git clone https://github.com/future-architect/vuls.git shino/redhat-vuls2

% cd vuls-compare
# download the testdata above and expand it
% wget https://github.com/user-attachments/files/18056974/testdata.tar.gz
% tar zxf testdata.tar.gz

# prepare vuls' config.toml as you like
% time go run main.go path/to/config.toml path/to/fixtures/rhel_89.json path/to/golden/rhel_89.json

Disclaimer:

  • vuls-compare's golden data is generated by vuls' current master.
  • it depends on oval db freshness, occasianlly should updated db and golden data

@shino shino force-pushed the shino/redhat-vuls2 branch from 6ae360c to 1699204 Compare December 9, 2024 06:13
@MaineK00n MaineK00n merged commit c304a65 into vuls2 Dec 9, 2024
5 checks passed
@MaineK00n MaineK00n deleted the shino/redhat-vuls2 branch December 9, 2024 06:58
shino added a commit that referenced this pull request Dec 9, 2024
shino added a commit that referenced this pull request Jan 17, 2025
shino added a commit that referenced this pull request Jan 20, 2025
* feat!(detector): use vuls2 for redhat/alma/rocky (#2075)

Co-authored-by: MaineK00n <[email protected]>

* chore(detector/vuls2): check downloaded time before updating db (#2077)

* chore(detector/vuls2): check downloaded time before updating db

Co-authored-by: MaineK00n <[email protected]>

* fix(detector/vuls2): fix post convert bugs (#2082)

* fix(detector/vuls2): use tag for selection logic (#2086)

* fix(models/cvecontents): use cve content type Alma, Rocky (#2087)

* fix(detector/vuls2): lower stauts string and compare (#2095)

* chore(deps): update vuls2 (#2096)

* feat(detector/vuls2): fill title and summary (#2097)

* chore(deps): update vuls2 (#2099)

* chore(deps): update vuls2

incorporate MaineK00n/vuls2#139

* Vuls2Conf instead of Vuls2DictConf

* Update detector/vuls2/db.go

Co-authored-by: MaineK00n <[email protected]>

* Update detector/vuls2/vendor.go

Co-authored-by: MaineK00n <[email protected]>

* Refactor

* more refactor

---------

Co-authored-by: MaineK00n <[email protected]>
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.

2 participants