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

chore(command): --without-jvncert flag limited to jvn command #337

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

MaineK00n
Copy link
Collaborator

@MaineK00n MaineK00n commented Sep 25, 2023

What did you implement:

--without-jvncert added by #335 is a flag that can only be used with JVN command. Therefore, it should be a flag limited to JVN command.

Type of change

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

How Has This Been Tested?

before

$ go-cve-dictionary fetch -h
Fetch Vulnerability dictionary

Usage:
  go-cve-dictionary fetch [command]

Available Commands:
  fortinet    Fetch Vulnerability dictionary from Fortinet Advisories
  jvn         Fetch Vulnerability dictionary from JVN
  nvd         Fetch Vulnerability dictionary from NVD

Flags:
      --batch-size int    The number of batch size to insert. (default 5)
  -h, --help              help for fetch
      --without-jvncert   not request to jvn cert (only jvn).

Global Flags:
...

after

$ go-cve-dictionary fetch -h
Fetch Vulnerability dictionary

Usage:
  go-cve-dictionary fetch [command]

Available Commands:
  fortinet    Fetch Vulnerability dictionary from Fortinet Advisories
  jvn         Fetch Vulnerability dictionary from JVN
  nvd         Fetch Vulnerability dictionary from NVD

Flags:
      --batch-size int   The number of batch size to insert. (default 5)
  -h, --help             help for fetch

Global Flags:
...

$ go-cve-dictionary fetch jvn -h
Fetch Vulnerability dictionary from JVN

Usage:
  go-cve-dictionary fetch jvn [flags]

Flags:
  -h, --help              help for jvn
      --without-jvncert   not request to jvn cert.

Global Flags:
      --batch-size int      The number of batch size to insert. (default 5)
...

$ go-cve-dictionary fetch jvn --without-jvncert
...
INFO[09-25|15:48:06] Inserting fetched CVEs(2023)... 
2998 / 2998 [-------------------------------------------------] 100.00% 4054 p/s
INFO[09-25|15:48:07] Refreshed 2998 CVEs. 
INFO[09-25|15:48:08] Finished fetching JVN. 

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 self-assigned this Sep 25, 2023
@MaineK00n MaineK00n force-pushed the MaineK00n/without-jvncert branch from a986ecc to fe55c1c Compare September 25, 2023 06:44
@MaineK00n MaineK00n merged commit 66e5573 into master Sep 25, 2023
@MaineK00n MaineK00n deleted the MaineK00n/without-jvncert branch September 25, 2023 07:01
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