-
Notifications
You must be signed in to change notification settings - Fork 202
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
Add Vulntotal CLI #801
Add Vulntotal CLI #801
Conversation
daa8a1c
to
d6b3998
Compare
❯ python vulntotal/vulntotal_cli.py 'pkg:pypi/[email protected]'
PURL: pkg:pypi/jinja2@2.4.1
Active DataSources: DEPS, GITHUB, GITLAB, OSS, OSV, SNYK, VULNERABLECODE
+----------------+----------------+----------------+----------------+---------------+
| CVE | DATASOURCE | ALIASES | AFFECTED | FIXED |
+================+================+================+================+===============+
| CVE-2020-28493 | SNYK | CVE-2020-28493 | (,2.11.3) | 2.11.3 |
| | | SNYK-PYTHON- | | |
| | | JINJA2-1012994 | | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2020-28493 | VULNERABLECODE | CVE-2020-28493 | 2.10.1-3 | 1.11.3-r0 |
| | | GHSA-g3rq-g295 | 2.10.3-6 | 1.11.3-r0 |
| | | -4j3m | 2.7.0-12 | 1.11.3-r0 |
| | | | 2.7.18-3 | 1.11.3-r0 |
| | | | 2.8-5 4.4.1-7 | 1.11.3-r0 |
| | | | 0.9.6-10 | 1.11.3-r0 |
| | | | 1.5-5 | 1.11.3-r0 |
| | | | 19.3.1-2 | 1.11.3-r0 |
| | | | 2.6-16 | 1.11.3-r0 |
| | | | 1.25.7-7 | 1.11.3-r0 |
| | | | 3.8.11-2 | 1.11.3-r0 |
| | | | 2.0rc1 2.0 | 1.11.3-r0 |
| | | | 2.1 2.1.1 | 1.11.3-r0 |
| | | | 2.2 2.2.1 | 1.11.3-r0 |
| | | | 2.3 2.3.1 | 1.11.3-r0 |
| | | | 2.4 2.4.1 | 1.11.3-r0 |
| | | | 2.5 2.5.1 | 1.11.3-r0 |
| | | | 2.5.2 2.5.3 | 1.11.3-r0 |
| | | | 2.5.4 2.5.5 | 1.11.3-r0 |
| | | | 2.6 2.7 | 1.11.3-r0 |
| | | | 2.7.1 2.7.2 | 1.11.3-r0 |
| | | | 2.7.3 2.8 | 1.11.3-r0 |
| | | | 2.8.1 2.9 | 1.11.3-r0 |
| | | | 2.9.1 2.9.2 | 1.11.3-r0 |
| | | | 2.9.3 2.9.4 | 1.11.3-r0 |
| | | | 2.9.5 2.9.6 | 1.11.3-r0 |
| | | | 2.10 2.10.1 | 1.11.3-r0 |
| | | | 2.10.2 2.10.3 | 1.11.3-r0 |
| | | | 2.11.0 2.11.1 | 2.11.3 |
| | | | 2.11.2 | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2020-28493 | DEPS | CVE-2020-28493 | 2.0.0 | 2.11.3 3.0.0 |
| | | | 2.0.0rc1 | 3.0.0a1 |
| | | | 2.1.0 2.1.1 | 3.0.0rc1 |
| | | | 2.10.0 2.10.1 | 3.0.0rc2 |
| | | | 2.10.2 2.10.3 | 3.0.1 3.0.2 |
| | | | 2.11.0 2.11.1 | 3.0.3 3.1.0 |
| | | | 2.11.2 2.2.0 | 3.1.1 3.1.2 |
| | | | 2.2.1 2.3.0 | |
| | | | 2.3.1 2.4.0 | |
| | | | 2.4.1 2.5.0 | |
| | | | 2.5.1 2.5.2 | |
| | | | 2.5.3 2.5.4 | |
| | | | 2.5.5 2.6.0 | |
| | | | 2.7.0 2.7.1 | |
| | | | 2.7.2 2.7.3 | |
| | | | 2.8.0 2.8.1 | |
| | | | 2.9.0 2.9.1 | |
| | | | 2.9.2 2.9.3 | |
| | | | 2.9.4 2.9.5 | |
| | | | 2.9.6 | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2020-28493 | GITHUB | CVE-2020-28493 | <2.11.3 | 2.11.3 |
| | | GHSA-g3rq-g295 | | |
| | | -4j3m | | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2020-28493 | GITLAB | CVE-2020-28493 | <2.11.3 | 2.11.3 |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2020-28493 | OSV | CVE-2020-28493 | 0 2.0 2.0rc1 | 2.11.3 |
| | | GHSA-g3rq-g295 | 2.1 2.1.1 | |
| | | -4j3m | 2.10 2.10.1 | |
| | | | 2.10.2 2.10.3 | |
| | | | 2.11.0 2.11.1 | |
| | | | 2.11.2 2.2 | |
| | | | 2.2.1 2.3 | |
| | | | 2.3.1 2.4 | |
| | | | 2.4.1 2.5 | |
| | | | 2.5.1 2.5.2 | |
| | | | 2.5.3 2.5.4 | |
| | | | 2.5.5 2.6 | |
| | | | 2.7 2.7.1 | |
| | | | 2.7.2 2.7.3 | |
| | | | 2.8 2.8.1 | |
| | | | 2.9 2.9.1 | |
| | | | 2.9.2 2.9.3 | |
| | | | 2.9.4 2.9.5 | |
| | | | 2.9.6 | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2020-28493 | OSV | CVE-2020-28493 | 0 2.0 2.0rc1 | 2.11.3 |
| | | GHSA-g3rq-g295 | 2.1 2.1.1 | |
| | | -4j3m | 2.10 2.10.1 | |
| | | PYSEC-2021-66 | 2.10.2 2.10.3 | |
| | | SNYK-PYTHON- | 2.11.0 2.11.1 | |
| | | JINJA2-1012994 | 2.11.2 2.2 | |
| | | | 2.2.1 2.3 | |
| | | | 2.3.1 2.4 | |
| | | | 2.4.1 2.5 | |
| | | | 2.5.1 2.5.2 | |
| | | | 2.5.3 2.5.4 | |
| | | | 2.5.5 2.6 | |
| | | | 2.7 2.7.1 | |
| | | | 2.7.2 2.7.3 | |
| | | | 2.8 2.8.1 | |
| | | | 2.9 2.9.1 | |
| | | | 2.9.2 2.9.3 | |
| | | | 2.9.4 2.9.5 | |
| | | | 2.9.6 | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2020-28493 | OSS | CVE-2020-28493 | | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2019-10906 | SNYK | CVE-2019-10906 | (,2.10.1) | 2.10.1 |
| | | SNYK-PYTHON- | | |
| | | JINJA2-174126 | | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2019-10906 | VULNERABLECODE | CVE-2019-10906 | 2.0rc1 2.0 | 2.10.1 |
| | | GHSA-462w-v97r | 2.1 2.1.1 | |
| | | -4m45 | 2.2 2.2.1 | |
| | | | 2.3 2.3.1 | |
| | | | 2.4 2.4.1 | |
| | | | 2.5 2.5.1 | |
| | | | 2.5.2 2.5.3 | |
| | | | 2.5.4 2.5.5 | |
| | | | 2.6 2.7 | |
| | | | 2.7.1 2.7.2 | |
| | | | 2.7.3 2.8 | |
| | | | 2.8.1 2.9 | |
| | | | 2.9.1 2.9.2 | |
| | | | 2.9.3 2.9.4 | |
| | | | 2.9.5 2.9.6 | |
| | | | 2.10 | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2019-10906 | GITHUB | CVE-2019-10906 | <2.10.1 | 2.10.1 |
| | | GHSA-462w-v97r | | |
| | | -4m45 | | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2019-10906 | GITLAB | CVE-2019-10906 | <2.10.1 | 2.10.1 |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2019-10906 | OSV | CVE-2019-10906 | 0 2.0 2.0rc1 | 2.10.1 |
| | | GHSA-462w-v97r | 2.1 2.1.1 | |
| | | -4m45 | 2.10 2.2 | |
| | | | 2.2.1 2.3 | |
| | | | 2.3.1 2.4 | |
| | | | 2.4.1 2.5 | |
| | | | 2.5.1 2.5.2 | |
| | | | 2.5.3 2.5.4 | |
| | | | 2.5.5 2.6 | |
| | | | 2.7 2.7.1 | |
| | | | 2.7.2 2.7.3 | |
| | | | 2.8 2.8.1 | |
| | | | 2.9 2.9.1 | |
| | | | 2.9.2 2.9.3 | |
| | | | 2.9.4 2.9.5 | |
| | | | 2.9.6 | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2019-10906 | OSV | CVE-2019-10906 | 0 2.0 2.0rc1 | 2.10.1 |
| | | GHSA-462w-v97r | 2.1 2.1.1 | |
| | | -4m45 | 2.10 2.2 | |
| | | PYSEC-2019-217 | 2.2.1 2.3 | |
| | | | 2.3.1 2.4 | |
| | | | 2.4.1 2.5 | |
| | | | 2.5.1 2.5.2 | |
| | | | 2.5.3 2.5.4 | |
| | | | 2.5.5 2.6 | |
| | | | 2.7 2.7.1 | |
| | | | 2.7.2 2.7.3 | |
| | | | 2.8 2.8.1 | |
| | | | 2.9 2.9.1 | |
| | | | 2.9.2 2.9.3 | |
| | | | 2.9.4 2.9.5 | |
| | | | 2.9.6 | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2014-1402 | SNYK | CVE-2014-1402 | (,2.7.2) | 2.7.2 |
| | | SNYK-PYTHON- | | |
| | | JINJA2-40028 | | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2014-1402 | VULNERABLECODE | CVE-2014-1402 | 2.0rc1 2.0 | 2.7.2 |
| | | GHSA-8r7q-cvjq | 2.1 2.1.1 | |
| | | -x353 | 2.2 2.2.1 | |
| | | | 2.3 2.3.1 | |
| | | | 2.4 2.4.1 | |
| | | | 2.5 2.5.1 | |
| | | | 2.5.2 2.5.3 | |
| | | | 2.5.4 2.5.5 | |
| | | | 2.6 2.7 | |
| | | | 2.7.1 | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2014-1402 | GITHUB | CVE-2014-1402 | <2.7.2 | 2.7.2 |
| | | GHSA-8r7q-cvjq | | |
| | | -x353 | | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2014-1402 | GITLAB | CVE-2014-1402 | <=2.7.1 | 2.7.2 |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2014-1402 | OSV | CVE-2014-1402 | 0 2.0 2.0rc1 | 2.7.2 |
| | | GHSA-8r7q-cvjq | 2.1 2.1.1 | |
| | | -x353 | 2.2 2.2.1 | |
| | | | 2.3 2.3.1 | |
| | | | 2.4 2.4.1 | |
| | | | 2.5 2.5.1 | |
| | | | 2.5.2 2.5.3 | |
| | | | 2.5.4 2.5.5 | |
| | | | 2.6 2.7 | |
| | | | 2.7.1 | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2014-1402 | OSV | CVE-2014-1402 | 0 2.0 2.0rc1 | 2.7.2 |
| | | PYSEC-2014-8 | 2.1 2.1.1 | |
| | | | 2.2 2.2.1 | |
| | | | 2.3 2.3.1 | |
| | | | 2.4 2.4.1 | |
| | | | 2.5 2.5.1 | |
| | | | 2.5.2 2.5.3 | |
| | | | 2.5.4 2.5.5 | |
| | | | 2.6 2.7 | |
| | | | 2.7.1 | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2014-1402 | OSS | CVE-2014-1402 | | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2016-10745 | VULNERABLECODE | GHSA- | 2.0rc1 2.0 | 2.8.1 |
| | | hj2j-77xm-mc5v | 2.1 2.1.1 | |
| | | CVE-2016-10745 | 2.2 2.2.1 | |
| | | | 2.3 2.3.1 | |
| | | | 2.4 2.4.1 | |
| | | | 2.5 2.5.1 | |
| | | | 2.5.2 2.5.3 | |
| | | | 2.5.4 2.5.5 | |
| | | | 2.6 2.7 | |
| | | | 2.7.1 2.7.2 | |
| | | | 2.7.3 2.8 | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2016-10745 | GITHUB | CVE-2016-10745 | <2.8.1 | 2.8.1 |
| | | GHSA- | | |
| | | hj2j-77xm-mc5v | | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2016-10745 | GITLAB | GHSA- | <2.8.1 | 2.8.1 |
| | | hj2j-77xm-mc5v | | |
| | | CVE-2016-10745 | | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2016-10745 | OSV | CVE-2016-10745 | 0 2.0 2.0rc1 | 2.8.1 |
| | | GHSA- | 2.1 2.1.1 | |
| | | hj2j-77xm-mc5v | 2.2 2.2.1 | |
| | | | 2.3 2.3.1 | |
| | | | 2.4 2.4.1 | |
| | | | 2.5 2.5.1 | |
| | | | 2.5.2 2.5.3 | |
| | | | 2.5.4 2.5.5 | |
| | | | 2.6 2.7 | |
| | | | 2.7.1 2.7.2 | |
| | | | 2.7.3 2.8 | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2016-10745 | OSV | CVE-2016-10745 | 0 2.0 2.0rc1 | 9b53045c34e61 |
| | | GHSA- | 2.1 2.1.1 | 013dc8f09b7e5 |
| | | hj2j-77xm-mc5v | 2.2 2.2.1 | 2a555fa16bed1 |
| | | PYSEC-2019-220 | 2.3 2.3.1 | 6 |
| | | | 2.4 2.4.1 | |
| | | | 2.5 2.5.1 | |
| | | | 2.5.2 2.5.3 | |
| | | | 2.5.4 2.5.5 | |
| | | | 2.6 2.7 | |
| | | | 2.7.1 2.7.2 | |
| | | | 2.7.3 2.8 | |
+----------------+----------------+----------------+----------------+---------------+
| CVE-2016-10745 | OSS | CVE-2016-10745 | | |
+----------------+----------------+----------------+----------------+---------------+ |
Now CLI also supports the listing of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM very nice... Do you mind to use click may be rather than argparse? Also I think there should be only two user-visible options: --purl
and --list
all the other options are debugging options. The user should not be able routinely to select/enable/disable validators at all. This means that we have not done the right job.
IMHO we should also find a way to report some JSON output. |
Some example of CLI could be https://github.com/nexB/python-inspector/blob/main/src/python_inspector/resolve_cli.py |
01fc4f3
to
fe20e49
Compare
Add doctsrings for all the functions and also add doctests/ unit tests for functions which have not been tested at all |
That looks like an odd result as I don't think that version |
@armijnhemel it's not a bug in Vulnerablecode, the version |
I will open a different issue, as I have found what the bug is. |
VulnTotal is making this request. response = requests.post(
"http://localhost:8001/api/packages/bulk_search/",
json={"purls": ["pkg:pypi/[email protected]"]},
)
The point here is that if I'm making an explicit request for |
@keshav-space which branch of vulnerablecode are you using in your local checkout? if you use the latest branch you will only get purls of |
It seems that what I found is indeed a different issue than what is currently being discussed ;-) I have opened a separate bug report in #915 |
Okay, let me try the latest branch. |
Along with some advanced hidden options especially useful for debugging and development.