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

fix(cpescan): bug in NvdVendorProductMatch #228

Merged
merged 1 commit into from
Oct 13, 2021
Merged

Conversation

kotakanbe
Copy link
Collaborator

@kotakanbe kotakanbe commented Oct 11, 2021

What did you implement:

When scanning without specifying the version of the CPE, the detection method should become NvdVendorProductMatch.
But there was a bug that if the Affected version of NVD is specified in the range, it became NvdExactVersionMatch.

  • config.toml
[servers.webmin]
    type = "pseudo"
     cpeNames = ["cpe:/a:webmin:webmin"]
  • report
./vuls report --format-full-text | grep NvdExact
[Oct 12 06:05:33]  INFO [localhost] vuls-v0.18.0-build-20211012_045947_aac5ef1
[Oct 12 06:05:33]  INFO [localhost] Validating config...
[Oct 12 06:05:33]  INFO [localhost] cveDict.type=sqlite3, cveDict.url=, cveDict.SQLite3Path=/data/vulsctl/docker/cve.sqlite3
[Oct 12 06:05:33]  INFO [localhost] ovalDict.type=sqlite3, ovalDict.url=, ovalDict.SQLite3Path=/home/ubuntu/go/src/github.com/future-architect/vuls/oval.sqlite3
[Oct 12 06:05:33]  INFO [localhost] gost.type=sqlite3, gost.url=, gost.SQLite3Path=/home/ubuntu/go/src/github.com/future-architect/vuls/gost.sqlite3
[Oct 12 06:05:33]  INFO [localhost] exploit.type=sqlite3, exploit.url=, exploit.SQLite3Path=/home/ubuntu/go/src/github.com/future-architect/vuls/go-exploitdb.sqlite3
[Oct 12 06:05:33]  INFO [localhost] metasploit.type=sqlite3, metasploit.url=, metasploit.SQLite3Path=/home/ubuntu/go/src/github.com/future-architect/vuls/go-msfdb.sqlite3
[Oct 12 06:05:33]  INFO [localhost] Loaded: /home/ubuntu/go/src/github.com/future-architect/vuls/results/2021-10-12T05:09:07+09:00
[Oct 12 06:05:33]  INFO [localhost] No need to refresh
| Confidence    | 100 / NvdExactVersionMatch                                                       |
| Confidence     | 100 / NvdExactVersionMatch                                                                          |
| Confidence    | 100 / NvdExactVersionMatch                                                       |
| Confidence     | 100 / NvdExactVersionMatch                                                       |
| Confidence     | 100 / NvdExactVersionMatch                                                                |
| Confidence     | 100 / NvdExactVersionMatch                                                                     |
| Confidence     | 100 / NvdExactVersionMatch                                                                     |
| Confidence     | 100 / NvdExactVersionMatch                                                       |
| Confidence    | 100 / NvdExactVersionMatch                                                       |
| Confidence     | 100 / NvdExactVersionMatch                                                       |
| Confidence     | 100 / NvdExactVersionMatch                                                       |
| Confidence     | 100 / NvdExactVersionMatch                                                       |
| Confidence     | 100 / NvdExactVersionMatch                                                       |
| Confidence     | 100 / NvdExactVersionMatch                                                       |
| Confidence     | 100 / NvdExactVersionMatch                                                       |
| Confidence     | 100 / NvdExactVersionMatch                                                       |
| Confidence    | 100 / NvdExactVersionMatch                                                       |
| Confidence    | 100 / NvdExactVersionMatch                                                       |
| Confidence     | 100 / NvdExactVersionMatch                                                       |
| Confidence     | 100 / NvdExactVersionMatch                                                       |
| Confidence     | 100 / NvdExactVersionMatch                                                       |

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

make test

Checklist:

  • 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

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