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

Fixed regex deprecation warning #390

Closed
wants to merge 14 commits into from
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CVE Binary Tool
===============

[![Build Status](https://github.com/intel/cve-bin-tool/workflows/cve-bin-tool/badge.svg)](https://github.com/intel/cve-bin-tool)
[![Build Status](https://github.com/intel/cve-bin-tool/workflows/cve-bin-tool/badge.svg?branch=master&event=push)](https://github.com/intel/cve-bin-tool/actions)
[![codecov](https://codecov.io/gh/intel/cve-bin-tool/branch/master/graph/badge.svg)](https://codecov.io/gh/intel/cve-bin-tool)
[![Gitter](https://badges.gitter.im/cve-bin-tool/community.svg)](https://gitter.im/cve-bin-tool/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
Expand All @@ -11,7 +11,9 @@ CVE Binary Tool
The CVE Binary Tool scans for a number of common, vulnerable open source
components (openssl, libpng, libxml2, expat and a few others) to let you know
if a given directory or binary file includes common libraries with known
vulnerabilities.
vulnerabilities. (If you have a list of components with versions and want a
list of CVEs, check out
[csv2cve](https://github.com/intel/cve-bin-tool#csv2cve) below.)

Usage:
`cve-bin-tool <flags> <path to directory>`
Expand All @@ -38,8 +40,10 @@ You can also do `python -m cve_bin_tool.cli <flags> <path to directory>` which i
```

The 0.3.1 release is intended to be the last release to officially support
python 2.7; please switch to python 3 for future releases and to use the
development tree. We are currently testing on python 3.6 and 3.7.
python 2.7; please switch to python 3.6+ for future releases and to use the
development tree. You can check [our CI
configuration](https://github.com/intel/cve-bin-tool/blob/master/.github/workflows/pythonapp.yml)
to see what versions of python we're explicitly testing.

This readme is intended to be a quickstart guide for using the tool. If you
require more information, there is also a [user manual](MANUAL.md) available.
Expand Down Expand Up @@ -117,6 +121,8 @@ Usage:

The CSV file must contain the following columns: `vendor,package,version` where the vendor and package names are exact matches to the strings in the National Vulnerability Database. You can read more about how to find the correct string in [the checker documentation](https://github.com/intel/cve-bin-tool/blob/master/cve_bin_tool/checkers/README.md), and the [csv2cve manual](https://github.com/intel/cve-bin-tool/blob/master/CSV2CVE.md) has more information on using this tool.

Note that `csv2cve`, unlike `cve-bin-tool`, will work on *any* product known in the National Vulnerability Database, not only those that have checkers written.

Feedback & Contributions
------------------------

Expand Down
2 changes: 2 additions & 0 deletions cve_bin_tool/checkers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"gnutls",
"icu",
"kerberos",
"libdb",
"libgcrypt",
"libjpeg",
"libnss",
Expand All @@ -20,4 +21,5 @@
"xerces",
"xml2",
"zlib",
"python",
]
2 changes: 1 addition & 1 deletion cve_bin_tool/cvedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class CVEDB(object):
FEED = "https://nvd.nist.gov/vuln/data-feeds"
LOGGER = LOGGER.getChild("CVEDB")
NVDCVE_FILENAME_TEMPLATE = "nvdcve-1.1-{}.json"
META_REGEX = re.compile("https:\/\/.*\/json\/.*-[0-9]*\.[0-9]*-[0-9]*\.meta")
META_REGEX = re.compile(r"https:\/\/.*\/json\/.*-[0-9]*\.[0-9]*-[0-9]*\.meta")
RANGE_UNSET = ""

def __init__(self, verify=True, feed=None, cachedir=None):
Expand Down
Loading