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

breaking-change(rdb): update gorm v2 #47

Merged
merged 45 commits into from
Aug 19, 2021

Conversation

MaineK00n
Copy link
Collaborator

@MaineK00n MaineK00n commented Jun 8, 2021

What did you implement:

GROMv2 has been released and will be supported by this PR.
Fixed a bug that the date column was missing in Documents and ShellCodes.

vulsctl PR: vulsio/vulsctl#38

It is not compatible with old DB schemas.

EROR[08-20|07:50:58] Failed to NewDB. Since SchemaVersion is incompatible, delete Database and fetch again 
[Aug 20 07:50:58] ERROR [localhost] Failed to fill with exploit: Failed to NewDB. Since SchemaVersion is incompatible, delete Database and fetch again.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

$ make clean-integration && make build-integration
$ make fetch-rdb && make fetch-redis
$ make diff-server-rdb-redis

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

Reference

@MaineK00n MaineK00n changed the title [WIP] feat(rdb): update gorm v2 feat(rdb): update gorm v2 Aug 9, 2021
@kotakanbe kotakanbe self-requested a review August 10, 2021 23:16
fetcher/exploitdb.go Outdated Show resolved Hide resolved
@kotakanbe kotakanbe changed the title feat(rdb): update gorm v2 breaking-change(rdb): update gorm v2 Aug 11, 2021
@kotakanbe
Copy link
Collaborator

kotakanbe commented Aug 11, 2021

Memo: go-exploitdb module on the Vuls side also needs to be updated.

 ubuntu@dev  ~│g│s│g│f│vuls  ⎇ master~  ./vuls report -refresh-cve --format-full-text 
[Aug 11 10:09:47]  INFO [localhost] vuls-v0.15.13-build-20210802_053500_d153004
[Aug 11 10:09:47]  INFO [localhost] Validating config...
[Aug 11 10:09:47]  INFO [localhost] cveDict.type=sqlite3, cveDict.url=, cveDict.SQLite3Path=/home/ubuntu/vulsctl/docker/cve.sqlite3
[Aug 11 10:09:47]  INFO [localhost] ovalDict.type=sqlite3, ovalDict.url=, ovalDict.SQLite3Path=/home/ubuntu/vulsctl/docker/oval.sqlite3
[Aug 11 10:09:47]  INFO [localhost] gost.type=sqlite3, gost.url=, gost.SQLite3Path=/home/ubuntu/vulsctl/docker/gost.sqlite3
[Aug 11 10:09:47]  INFO [localhost] exploit.type=sqlite3, exploit.url=, exploit.SQLite3Path=/home/ubuntu/go/src/github.com/vulsio/go-exploitdb/integration/go-exploitdb.new.sqlite3
[Aug 11 10:09:47]  INFO [localhost] metasploit.type=sqlite3, metasploit.url=, metasploit.SQLite3Path=/home/ubuntu/vulsctl/docker/go-msfdb.sqlite3
[Aug 11 10:09:47]  INFO [localhost] Loaded: /home/ubuntu/go/src/github.com/future-architect/vuls/results/2021-08-09T05:14:17+09:00
[Aug 11 10:09:47]  INFO [localhost] pseudo type. Skip OVAL and gost detection
[Aug 11 10:09:50]  INFO [localhost] rails: 52 CVEs are detected with CPE
EROR[08-11|10:09:51] Failed to migrate db.                    err="Failed to migrate. err: duplicate column name: id"
[Aug 11 10:09:51] ERROR [localhost] Failed to fill with exploit:
    github.com/future-architect/vuls/detector.Detect
        /home/ubuntu/go/src/github.com/future-architect/vuls/detector/detector.go:91
  - Failed to migrate. err: duplicate column name: id

Copy link
Collaborator

@kotakanbe kotakanbe left a comment

Choose a reason for hiding this comment

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

LGTM

@kotakanbe
Copy link
Collaborator

I ran an integration test and found no difference between the master and this PR.

@kotakanbe kotakanbe merged commit ad3f6bf into vulsio:master Aug 19, 2021
@MaineK00n MaineK00n deleted the update-gorm-v2 branch August 23, 2021 03:48
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