ds-server-lib 6.2.0__tar.gz → 6.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ds_server_lib-6.2.0 → ds_server_lib-6.3.0}/PKG-INFO +3 -2
- {ds_server_lib-6.2.0 → ds_server_lib-6.3.0}/pyproject.toml +3 -2
- {ds_server_lib-6.2.0 → ds_server_lib-6.3.0}/src/ds_server_lib.egg-info/PKG-INFO +3 -2
- {ds_server_lib-6.2.0 → ds_server_lib-6.3.0}/src/ds_server_lib.egg-info/requires.txt +1 -1
- {ds_server_lib-6.2.0 → ds_server_lib-6.3.0}/src/server_lib/simple.py +0 -28
- {ds_server_lib-6.2.0 → ds_server_lib-6.3.0}/README.md +0 -0
- {ds_server_lib-6.2.0 → ds_server_lib-6.3.0}/setup.cfg +0 -0
- {ds_server_lib-6.2.0 → ds_server_lib-6.3.0}/src/ds_server_lib.egg-info/SOURCES.txt +0 -0
- {ds_server_lib-6.2.0 → ds_server_lib-6.3.0}/src/ds_server_lib.egg-info/dependency_links.txt +0 -0
- {ds_server_lib-6.2.0 → ds_server_lib-6.3.0}/src/ds_server_lib.egg-info/top_level.txt +0 -0
- {ds_server_lib-6.2.0 → ds_server_lib-6.3.0}/src/server_lib/__init__.py +0 -0
- {ds_server_lib-6.2.0 → ds_server_lib-6.3.0}/tests/test_simple.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ds-server-lib
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.3.0
|
|
4
4
|
Summary: Server library for owasp depscan
|
|
5
5
|
Author-email: Team AppThreat <cloud@appthreat.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -15,11 +15,12 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
19
|
Classifier: Topic :: Security
|
|
19
20
|
Classifier: Topic :: Utilities
|
|
20
21
|
Requires-Python: >=3.10
|
|
21
22
|
Description-Content-Type: text/markdown
|
|
22
|
-
Requires-Dist: appthreat-vulnerability-db
|
|
23
|
+
Requires-Dist: appthreat-vulnerability-db~=6.7.2
|
|
23
24
|
Requires-Dist: custom-json-diff>=2.1.6
|
|
24
25
|
Requires-Dist: quart>=0.20.0
|
|
25
26
|
Requires-Dist: rich>=13.9.4
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "ds-server-lib"
|
|
3
|
-
version = "6.
|
|
3
|
+
version = "6.3.0"
|
|
4
4
|
description = "Server library for owasp depscan"
|
|
5
5
|
authors = [
|
|
6
6
|
{name = "Team AppThreat", email = "cloud@appthreat.com"},
|
|
7
7
|
]
|
|
8
8
|
dependencies = [
|
|
9
|
-
"appthreat-vulnerability-db
|
|
9
|
+
"appthreat-vulnerability-db~=6.7.2",
|
|
10
10
|
"custom-json-diff>=2.1.6",
|
|
11
11
|
"quart>=0.20.0",
|
|
12
12
|
"rich>=13.9.4",
|
|
@@ -25,6 +25,7 @@ classifiers = [
|
|
|
25
25
|
"Programming Language :: Python :: 3.11",
|
|
26
26
|
"Programming Language :: Python :: 3.12",
|
|
27
27
|
"Programming Language :: Python :: 3.13",
|
|
28
|
+
"Programming Language :: Python :: 3.14",
|
|
28
29
|
"Topic :: Security",
|
|
29
30
|
"Topic :: Utilities",
|
|
30
31
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ds-server-lib
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.3.0
|
|
4
4
|
Summary: Server library for owasp depscan
|
|
5
5
|
Author-email: Team AppThreat <cloud@appthreat.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -15,11 +15,12 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
19
|
Classifier: Topic :: Security
|
|
19
20
|
Classifier: Topic :: Utilities
|
|
20
21
|
Requires-Python: >=3.10
|
|
21
22
|
Description-Content-Type: text/markdown
|
|
22
|
-
Requires-Dist: appthreat-vulnerability-db
|
|
23
|
+
Requires-Dist: appthreat-vulnerability-db~=6.7.2
|
|
23
24
|
Requires-Dist: custom-json-diff>=2.1.6
|
|
24
25
|
Requires-Dist: quart>=0.20.0
|
|
25
26
|
Requires-Dist: rich>=13.9.4
|
|
@@ -15,7 +15,6 @@ from quart import Quart, request
|
|
|
15
15
|
from rich.console import Console
|
|
16
16
|
from server_lib import ServerOptions
|
|
17
17
|
from vdb.lib import search
|
|
18
|
-
from vdb.lib.npm import NpmSource
|
|
19
18
|
|
|
20
19
|
app = Quart(f"dep-scan server ({__name__})", static_folder=None)
|
|
21
20
|
app.config.from_prefixed_env(prefix="DEPSCAN_SERVER")
|
|
@@ -33,16 +32,6 @@ def get_allowed_git_schemes(default_schemes=None):
|
|
|
33
32
|
|
|
34
33
|
allowed_git_schemes = get_allowed_git_schemes()
|
|
35
34
|
|
|
36
|
-
# Dict mapping project type to the audit source
|
|
37
|
-
type_audit_map = {
|
|
38
|
-
"nodejs": NpmSource(),
|
|
39
|
-
"js": NpmSource(),
|
|
40
|
-
"javascript": NpmSource(),
|
|
41
|
-
"ts": NpmSource(),
|
|
42
|
-
"typescript": NpmSource(),
|
|
43
|
-
"npm": NpmSource(),
|
|
44
|
-
}
|
|
45
|
-
npm_app_info = {"name": "owasp-depscan-server", "version": "6.2.0"}
|
|
46
35
|
|
|
47
36
|
console = Console(
|
|
48
37
|
log_time=False,
|
|
@@ -224,18 +213,6 @@ def _get_request_api_key() -> str | None:
|
|
|
224
213
|
return request.headers.get("X-API-Key")
|
|
225
214
|
|
|
226
215
|
|
|
227
|
-
def audit(project_type, pkg_list):
|
|
228
|
-
"""
|
|
229
|
-
Method to audit packages using remote source such as npm advisory
|
|
230
|
-
|
|
231
|
-
:param project_type: Project type
|
|
232
|
-
:param pkg_list: List of packages
|
|
233
|
-
:return: Results
|
|
234
|
-
"""
|
|
235
|
-
results = type_audit_map[project_type].bulk_search(app_info=npm_app_info, pkg_list=pkg_list)
|
|
236
|
-
return results
|
|
237
|
-
|
|
238
|
-
|
|
239
216
|
@app.get("/")
|
|
240
217
|
async def index():
|
|
241
218
|
"""
|
|
@@ -469,11 +446,6 @@ async def run_scan():
|
|
|
469
446
|
# Direct purl-based lookups are not supported yet.
|
|
470
447
|
if bom_file_path is not None:
|
|
471
448
|
pkg_list, _ = get_pkg_list(bom_file_path)
|
|
472
|
-
# Here we are assuming there will be only one type
|
|
473
|
-
if len(project_type_list) == 1 and project_type_list[0] in type_audit_map:
|
|
474
|
-
audit_results = audit(project_type_list[0], pkg_list)
|
|
475
|
-
if audit_results:
|
|
476
|
-
results = results + audit_results
|
|
477
449
|
if not pkg_list:
|
|
478
450
|
if logger_instance:
|
|
479
451
|
logger_instance.debug("Empty package search attempted!")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|