CiscoPSIRT / openVulnAPI

Documentation and Tools for Cisco's PSIRT openVuln API
https://developer.cisco.com/psirt/
MIT License
102 stars 51 forks source link

OpenVulnQuery: Remove redundant fields from help #21

Closed santosomar closed 7 years ago

santosomar commented 7 years ago

Currently the help shows the following:

omar@omar:~$ openVulnQuery -h
usage: openVulnQuery [-h] (--cvrf | --oval)
(--all | --advisory API_RESOURCE | --cve API_RESOURCE | --latest API_RESOURCE | --severity API_RESOURCE | --year API_RESOURCE)
[--csv OUTPUT_FORMAT | --json OUTPUT_FORMAT] [--count]
[--fields {advisory_id,sir,first_published,last_updated,cves,cvss_base_score,advisory_title,publication_url,cwe,product_names,summary,oval_url,cvrf_url,bug_ids} [{advisory_id,sir,first_published,last_updated,cves,cvss_base_score,advisory_title,publication_url,cwe,product_names,summary,oval_url,cvrf_url,bug_ids} ...]]
Cisco OpenVuln API Command Line Interface
optional arguments:
-h, --help show this help message and exit
--cvrf Selects from cvrf advisories
--oval Selects from oval advisories
--all Retrieve all cvrf/oval advisiories
--advisory API_RESOURCE
Retrieve advisories by advisory id
--cve API_RESOURCE Retrieve advisories by cve id
--latest API_RESOURCE
Retrieve latest (number) of advisories
--severity API_RESOURCE
Retrieve advisories by severity (low, medium, high,
critical)
--year API_RESOURCE Retrieve advisories by year
--csv OUTPUT_FORMAT Output to CSV with filepath
--json OUTPUT_FORMAT Output to JSON with filepath
--count, -c Count of any field or fields
--fields {advisory_id,sir,first_published,last_updated,cves,cvss_base_score,advisory_title,publication_url,cwe,product_names,summary,oval_url,cvrf_url,bug_ids} [{advisory_id,sir,first_published,last_updated,cves,cvss_base_score,advisory_title,publication_url,cwe,product_names,summary,oval_url,cvrf_url,bug_ids} ...], -f {advisory_id,sir,first_published,last_updated,cves,cvss_base_score,advisory_title,publication_url,cwe,product_names,summary,oval_url,cvrf_url,bug_ids} [{advisory_id,sir,first_published,last_updated,cves,cvss_base_score,advisory_title,publication_url,cwe,product_names,summary,oval_url,cvrf_url,bug_ids} ...]
Seperate fields by spaces to return advisory
information

Please remove the redundant fields like:

In the two main sections:

[--fields {advisory_id,sir,first_published,last_updated,cves,cvss_base_score,advisory_title,publication_url,cwe,product_names,summary,oval_url,cvrf_url,bug_ids} [{advisory_id,sir,first_published,last_updated,cves,cvss_base_score,advisory_title,publication_url,cwe,product_names,summary,oval_url,cvrf_url,bug_ids} ...]]

and in the bottom:

--fields {advisory_id,sir,first_published,last_updated,cves,cvss_base_score,advisory_title,publication_url,cwe,product_names,summary,oval_url,cvrf_url,bug_ids} [{advisory_id,sir,first_published,last_updated,cves,cvss_base_score,advisory_title,publication_url,cwe,product_names,summary,oval_url,cvrf_url,bug_ids} ...], -f {advisory_id,sir,first_published,last_updated,cves,cvss_base_score,advisory_title,publication_url,cwe,product_names,summary,oval_url,cvrf_url,bug_ids} [{advisory_id,sir,first_published,last_updated,cves,cvss_base_score,advisory_title,publication_url,cwe,product_names,summary,oval_url,cvrf_url,bug_ids} ...]
iamparas commented 7 years ago

The redundant fields are removed in the new update.

santosomar commented 7 years ago

Excellent! Thank you @iamparas !