Skip to content

Commit

Permalink
modifying vulmatch path
Browse files Browse the repository at this point in the history
  • Loading branch information
himynamesdave committed Dec 18, 2024
1 parent 2c63806 commit b8d025e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ARANGODB_PASSWORD=
MAX_PAGE_SIZE=
DEFAULT_PAGE_SIZE=
# R2 PATHS
NVD_BUCKET_ROOT_PATH=https://cve2stix.vulmatch.com/cve2stix-action-output/
CVE2STIX_BUCKET_ROOT_PATH=https://cve2stix.vulmatch.com/
# arango_cve_processor envs
NVD_API_KEY=
CTIBUTLER_HOST=
2 changes: 1 addition & 1 deletion .env.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ Arango CTI Processor uses the NVD API to join objects. To avoid running in NVD A

All of the knowledgebases are stored on Cloudflare R2. The variables in this part of the config should not be changed.

* `NVD_BUCKET_ROOT_PATH`: `https://cve2stix.vulmatch.com/cve2stix-action-output/`
* `CVE2STIX_BUCKET_ROOT_PATH`: `https://cve2stix.vulmatch.com/`
2 changes: 1 addition & 1 deletion vulmatch/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,4 @@
ARANGODB_HOST_URL = os.getenv("ARANGODB_HOST_URL")
ARANGODB_DATABASE = "vulmatch"

NVD_BUCKET_ROOT_PATH = os.environ["NVD_BUCKET_ROOT_PATH"]
CVE2STIX_BUCKET_ROOT_PATH = os.environ["CVE2STIX_BUCKET_ROOT_PATH"]
2 changes: 1 addition & 1 deletion vulmatch/worker/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def run_nvd_task(data, job: Job, nvd_type='cve'):
temp_dir = str(Path(tempfile.gettempdir())/f"vulmatch/nvd-{nvd_type}--{str(job.id)}")
tasks = []
for d in dates:
url = urljoin(settings.NVD_BUCKET_ROOT_PATH, daily_url(d, nvd_type))
url = urljoin(settings.CVE2STIX_BUCKET_ROOT_PATH, daily_url(d, nvd_type))
task = download_file.si(url, temp_dir, job_id=job.id)
task |= upload_file.s(f'nvd_{nvd_type}', stix2arango_note=f"vulmatch-{nvd_type}-date={d.strftime('%Y-%m-%d')}", job_id=job.id, params=job.parameters)
task.set_immutable(True)
Expand Down

0 comments on commit b8d025e

Please sign in to comment.