langprotect-mcp-gateway 1.3.2__tar.gz → 1.3.3__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.
- {langprotect_mcp_gateway-1.3.2 → langprotect_mcp_gateway-1.3.3}/PKG-INFO +1 -1
- {langprotect_mcp_gateway-1.3.2 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway/gateway.py +13 -1
- {langprotect_mcp_gateway-1.3.2 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway.egg-info/PKG-INFO +1 -1
- {langprotect_mcp_gateway-1.3.2 → langprotect_mcp_gateway-1.3.3}/pyproject.toml +1 -1
- {langprotect_mcp_gateway-1.3.2 → langprotect_mcp_gateway-1.3.3}/LICENSE +0 -0
- {langprotect_mcp_gateway-1.3.2 → langprotect_mcp_gateway-1.3.3}/README.md +0 -0
- {langprotect_mcp_gateway-1.3.2 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway/__init__.py +0 -0
- {langprotect_mcp_gateway-1.3.2 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway/response_masker.py +0 -0
- {langprotect_mcp_gateway-1.3.2 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway/setup_helper.py +0 -0
- {langprotect_mcp_gateway-1.3.2 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway.egg-info/SOURCES.txt +0 -0
- {langprotect_mcp_gateway-1.3.2 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway.egg-info/dependency_links.txt +0 -0
- {langprotect_mcp_gateway-1.3.2 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway.egg-info/entry_points.txt +0 -0
- {langprotect_mcp_gateway-1.3.2 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway.egg-info/requires.txt +0 -0
- {langprotect_mcp_gateway-1.3.2 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway.egg-info/top_level.txt +0 -0
- {langprotect_mcp_gateway-1.3.2 → langprotect_mcp_gateway-1.3.3}/setup.cfg +0 -0
- {langprotect_mcp_gateway-1.3.2 → langprotect_mcp_gateway-1.3.3}/tests/test_response_masker.py +0 -0
{langprotect_mcp_gateway-1.3.2 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway/gateway.py
RENAMED
|
@@ -546,7 +546,7 @@ class LangProtectGateway:
|
|
|
546
546
|
output_text = self._extract_text_from_result(result_content)
|
|
547
547
|
|
|
548
548
|
if output_text:
|
|
549
|
-
logger.debug(f"
|
|
549
|
+
logger.debug(f"🔍 Scanning output: {len(output_text)} chars")
|
|
550
550
|
output_scan = self.auth.scan_output(
|
|
551
551
|
tool_name=tool_name,
|
|
552
552
|
output_content=output_text,
|
|
@@ -554,6 +554,18 @@ class LangProtectGateway:
|
|
|
554
554
|
metadata={'server_name': server_name}
|
|
555
555
|
)
|
|
556
556
|
|
|
557
|
+
# 🚨 CRITICAL: Check if backend blocked the request
|
|
558
|
+
if output_scan.get('status') == 'blocked' or output_scan.get('action') == 'blocked':
|
|
559
|
+
risk_score = output_scan.get('risk_score', 0)
|
|
560
|
+
severity = output_scan.get('severity', 'high')
|
|
561
|
+
logger.error(f"🚫 OUTPUT BLOCKED: {tool_name} (risk={risk_score}, severity={severity})")
|
|
562
|
+
raise ValueError(
|
|
563
|
+
f"Request blocked by security policy: {tool_name}\n"
|
|
564
|
+
f"Risk Score: {risk_score}\n"
|
|
565
|
+
f"Severity: {severity}\n"
|
|
566
|
+
f"This request was blocked because it would return sensitive data."
|
|
567
|
+
)
|
|
568
|
+
|
|
557
569
|
if output_scan.get('masked'):
|
|
558
570
|
# Replace output with masked version
|
|
559
571
|
masked_text = output_scan.get('output', output_text)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "langprotect-mcp-gateway"
|
|
7
|
-
version = "1.3.
|
|
7
|
+
version = "1.3.3"
|
|
8
8
|
description = "Security gateway for Model Context Protocol (MCP) to protect AI tool interactions"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.8"
|
|
File without changes
|
|
File without changes
|
{langprotect_mcp_gateway-1.3.2 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langprotect_mcp_gateway-1.3.2 → langprotect_mcp_gateway-1.3.3}/tests/test_response_masker.py
RENAMED
|
File without changes
|