@vercel/python
Advanced tools
+5
-5
| { | ||
| "name": "@vercel/python", | ||
| "version": "6.16.1", | ||
| "version": "6.17.0", | ||
| "main": "./dist/index.js", | ||
@@ -18,3 +18,3 @@ "license": "Apache-2.0", | ||
| "dependencies": { | ||
| "@vercel/python-analysis": "0.7.0" | ||
| "@vercel/python-analysis": "0.8.0" | ||
| }, | ||
@@ -39,5 +39,5 @@ "devDependencies": { | ||
| "is-port-reachable": "3.1.0", | ||
| "@vercel/python-runtime": "0.5.1", | ||
| "@vercel/build-utils": "13.5.0", | ||
| "@vercel/error-utils": "2.0.3" | ||
| "@vercel/build-utils": "13.6.0", | ||
| "@vercel/error-utils": "2.0.3", | ||
| "@vercel/python-runtime": "0.5.2" | ||
| }, | ||
@@ -44,0 +44,0 @@ "scripts": { |
+17
-5
@@ -8,3 +8,3 @@ # Auto-generated template used by vercel dev (Python, ASGI/WSGI) | ||
| from os import path as _p | ||
| from importlib import import_module | ||
| from importlib import util as _importlib_util | ||
| import mimetypes | ||
@@ -76,4 +76,16 @@ | ||
| # ASGI/WSGI app detection | ||
| USER_MODULE = "__VC_DEV_MODULE_PATH__" | ||
| _mod = import_module(USER_MODULE) | ||
| _MODULE_NAME = "__VC_DEV_MODULE_NAME__" | ||
| _ENTRY_ABS = "__VC_DEV_ENTRY_ABS__" | ||
| # Import user module by file path, matching vc_init.py's approach. | ||
| # https://docs.python.org/3/library/importlib.html#importing-a-source-file-directly | ||
| _spec = _importlib_util.spec_from_file_location(_MODULE_NAME, _ENTRY_ABS) | ||
| if _spec is None or _spec.loader is None: | ||
| raise RuntimeError( | ||
| f"Could not load module spec for '{_MODULE_NAME}' at {_ENTRY_ABS}" | ||
| ) | ||
| _mod = _importlib_util.module_from_spec(_spec) | ||
| sys.modules[_MODULE_NAME] = _mod | ||
| _spec.loader.exec_module(_mod) | ||
| _user_app_name = ( | ||
@@ -88,3 +100,3 @@ "app" | ||
| raise RuntimeError( | ||
| f"Missing 'app' or 'application' in module '{USER_MODULE}'. " | ||
| f"Missing 'app' or 'application' in module '{_MODULE_NAME}'. " | ||
| f"Define `app = ...` or `application = ...` in your entrypoint." | ||
@@ -143,3 +155,3 @@ ) | ||
| _color( | ||
| f"Could not determine the application interface for '{USER_MODULE}:{_user_app_name}'\n" | ||
| f"Could not determine the application interface for '{_MODULE_NAME}:{_user_app_name}'\n" | ||
| f"Expected either:\n" | ||
@@ -146,0 +158,0 @@ f" - An ASGI app: async callable(scope, receive, send)\n" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 11 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 11 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
381736
1.59%10881
1.32%+ Added
- Removed