Skip to content

Commit e3d2424

Browse files
authored
Merge pull request #3349 from luijait/fix_installs_23_06_24
Fix Docker Install and setup.py dependencies
2 parents 80721f3 + a84a404 commit e3d2424

File tree

5 files changed

+29
-8
lines changed

5 files changed

+29
-8
lines changed

.devcontainer/docker-compose.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: '3'
2+
services:
3+
app:
4+
build:
5+
context: .
6+
dockerfile: Dockerfile
7+
env_file:
8+
- ../.env

.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
GITHUB_TOKEN="ADD_YOUR_GH_TOKEN_HERE"

.devcontainer/Dockerfile renamed to Dockerfile

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
FROM ubuntu:20.04
22

33
# [Optional] Uncomment this section to install additional OS packages.
4+
45
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
56
&& apt-get -y install --no-install-recommends \
6-
net-tools python3 python3-pip python3-dev \
7-
curl gnupg nmap less git aarch64-linux-gnu-gcc wget
7+
net-tools python3 python3-pip python3-dev \
8+
curl gnupg nmap less git gcc-aarch64-linux-gnu wget build-essential
89

910
RUN pip3 install Cython
11+
12+
# Copy the parent directory of the current directory into the Docker image
13+
COPY . /workspace/RDV
14+
WORKDIR /workspace/RDV
1015
## SOURCE INSTALL
1116
## Install babeltrace from sources:
1217
#

rvd_tools/cli.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ def cve_validate(version, file):
580580
@click.option("--product", default=None, help="Product to research.")
581581
@click.option("--push/--no-push", default=False, help="Push to RVD in a new ticket.")
582582
@cve.command("search")
583-
def cve_search(all, vendor, product, push):
583+
def cve_search(all, vendor, product, push, base_url=None):
584584
"""
585585
Search CVEs and CPEs from cve-search enabled DB, import them.
586586
@@ -590,14 +590,19 @@ def cve_search(all, vendor, product, push):
590590
Makes use of the following:
591591
- https://github.com/cve-search/PyCVESearch
592592
- (indirectly) https://github.com/cve-search/cve-search
593+
594+
:param base_url: The base URL for the CVE search API (required). If not provided, the default URL will be used.
593595
"""
594596
# cve = CVESearch()
595597
cyan("Searching for CVEs and CPEs with cve-search ...")
596598
from pycvesearch import CVESearch
597599

600+
if base_url is None:
601+
base_url = "https://cvepremium.circl.lu/"
602+
598603
if all:
599604
if vendor:
600-
cve = CVESearch()
605+
cve = CVESearch(base_url=base_url)
601606
vendor_flaws = cve.browse(vendor)
602607
products = vendor_flaws["product"]
603608
for product in products:
@@ -666,7 +671,7 @@ def cve_search(all, vendor, product, push):
666671
return
667672

668673
if vendor and product:
669-
cve = CVESearch()
674+
cve = CVESearch(base_url=base_url)
670675
cyan("Searching for vendor/product: ", end="")
671676
print(vendor + "/" + product)
672677
results = cve.search(vendor + "/" + product)
@@ -725,7 +730,7 @@ def cve_search(all, vendor, product, push):
725730
pusher.update_ticket(issue, new_flaw)
726731

727732
elif vendor:
728-
cve = CVESearch()
733+
cve = CVESearch(base_url=base_url)
729734
cyan("Browsing for vendor: ", end="")
730735
print(vendor)
731736
# pprint.pprint(cve.browse(vendor))

setup.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"dedupe==1.10.0",
1515
"jsonschema",
1616
"mergedeep",
17-
"numpy",
17+
"numpy==1.17.3",
1818
"plotly",
1919
#"pprint",
2020
"pygithub",
@@ -23,13 +23,15 @@
2323
"pyyaml==6.0",
2424
"qprompt",
2525
"retrying",
26+
"dedupe-variable-datetime==0.1.0",
2627
"tabulate",
2728
"retrying",
2829
"vulners",
2930
"xmltodict",
31+
"zope.index==5.2",
3032
"importlib-resources",
3133
"python-gitlab==2.0.0",
32-
"requests==2.23.0",
34+
"requests==2.32.0",
3335
"pycvesearch==1.0",
3436
"cvsslib@git+https://github.com/aliasrobotics/RVSS#egg=cvsslib",
3537
],

0 commit comments

Comments
 (0)