Skip to content

Commit a7482a3

Browse files
committed
Add license header files
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
1 parent ed954ec commit a7482a3

File tree

6 files changed

+37
-22
lines changed

6 files changed

+37
-22
lines changed

vulnerabilities/pipelines/v2_importers/apache_httpd_importer.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
#
2+
# Copyright (c) nexB Inc. and others. All rights reserved.
3+
# VulnerableCode is a trademark of nexB Inc.
4+
# SPDX-License-Identifier: Apache-2.0
5+
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6+
# See https://github.com/aboutcode-org/vulnerablecode for support or download.
7+
# See https://aboutcode.org for more information about nexB OSS projects.
8+
#
9+
110
import logging
211
import re
312
import urllib.parse

vulnerabilities/pipelines/v2_importers/vulnrichment_importer.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,6 @@ def parse_cve_advisory(self, raw_data, advisory_url):
179179
if match:
180180
weaknesses.add(int(match.group(1)))
181181

182-
print(f"cve_id: {cve_id}")
183-
print(f"date_published: {date_published}")
184-
print(references)
185-
print(f"summary: {summary}")
186-
print(f"weaknesses: {weaknesses}")
187-
print(f"advisory_url: {advisory_url}")
188-
print(f"severities: {severities}")
189-
190182
return AdvisoryData(
191183
advisory_id=cve_id,
192184
aliases=[],

vulnerabilities/tests/pipelines/test_apache_httpd_importer_pipeline_v2.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
#
2+
# Copyright (c) nexB Inc. and others. All rights reserved.
3+
# VulnerableCode is a trademark of nexB Inc.
4+
# SPDX-License-Identifier: Apache-2.0
5+
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6+
# See https://github.com/aboutcode-org/vulnerablecode for support or download.
7+
# See https://aboutcode.org for more information about nexB OSS projects.
8+
#
9+
110
import pytest
211
import requests
312

vulnerabilities/tests/pipelines/test_github_importer_v2.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
from datetime import datetime
2-
from unittest.mock import MagicMock
1+
#
2+
# Copyright (c) nexB Inc. and others. All rights reserved.
3+
# VulnerableCode is a trademark of nexB Inc.
4+
# SPDX-License-Identifier: Apache-2.0
5+
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6+
# See https://github.com/aboutcode-org/vulnerablecode for support or download.
7+
# See https://aboutcode.org for more information about nexB OSS projects.
8+
#
9+
310
from unittest.mock import patch
411

512
import pytest
613
from packageurl import PackageURL
7-
from univers.version_constraint import VersionConstraint
8-
from univers.version_range import RANGE_CLASS_BY_SCHEMES
9-
from univers.versions import SemverVersion
10-
11-
from vulnerabilities.importer import AdvisoryData
12-
from vulnerabilities.importer import AffectedPackage
13-
from vulnerabilities.importer import Reference
14-
from vulnerabilities.importer import VulnerabilitySeverity
14+
1515
from vulnerabilities.pipelines.v2_importers.github_importer import GitHubAPIImporterPipeline
1616
from vulnerabilities.pipelines.v2_importers.github_importer import get_cwes_from_github_advisory
1717
from vulnerabilities.pipelines.v2_importers.github_importer import get_purl

vulnerabilities/tests/pipelines/test_npm_importer_pipeline_v2.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
#
2+
# Copyright (c) nexB Inc. and others. All rights reserved.
3+
# VulnerableCode is a trademark of nexB Inc.
4+
# SPDX-License-Identifier: Apache-2.0
5+
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6+
# See https://github.com/aboutcode-org/vulnerablecode for support or download.
7+
# See https://aboutcode.org for more information about nexB OSS projects.
8+
#
9+
110
import json
211
from types import SimpleNamespace
312

vulnerabilities/tests/pipelines/test_pysec_v2_importer.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
import json
22
from io import BytesIO
3-
from unittest.mock import MagicMock
43
from unittest.mock import patch
5-
from zipfile import BadZipFile
64
from zipfile import ZipFile
75

86
import pytest
97

108
from vulnerabilities.importer import AdvisoryData
11-
from vulnerabilities.pipelines import VulnerableCodeBaseImporterPipeline
12-
from vulnerabilities.pipelines import VulnerableCodeBaseImporterPipelineV2
139
from vulnerabilities.pipelines.v2_importers.pysec_importer import (
1410
PyPIImporterPipeline, # Path to the PyPI Importer
1511
)

0 commit comments

Comments
 (0)