langprotect-mcp-gateway 1.3.2__py3-none-any.whl → 1.3.3__py3-none-any.whl

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.
@@ -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" Scanning output: {len(output_text)} chars")
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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langprotect-mcp-gateway
3
- Version: 1.3.2
3
+ Version: 1.3.3
4
4
  Summary: Security gateway for Model Context Protocol (MCP) to protect AI tool interactions
5
5
  Author-email: LangProtect Security Team <security@langprotect.com>
6
6
  License: MIT
@@ -0,0 +1,10 @@
1
+ langprotect_mcp_gateway/__init__.py,sha256=PedabfF6wZ_6KxuN60A4qz8T1gD9MszuXwhmrHlGH7I,510
2
+ langprotect_mcp_gateway/gateway.py,sha256=cz18alX0d6JYL5CZgsdmlXMcEDcbpvfsLuVbhGBqQOo,31735
3
+ langprotect_mcp_gateway/response_masker.py,sha256=ui1JusuPwuOKSfrDtt0FxLEGs_y512RcTG4gSz2-MT8,14702
4
+ langprotect_mcp_gateway/setup_helper.py,sha256=vaE9SqF5oUdREooAUFUYXBWGC-3qHrG5pVfAddYnbOY,9752
5
+ langprotect_mcp_gateway-1.3.3.dist-info/licenses/LICENSE,sha256=aoVP65gKtirVmFPToow5L9IKN4FNjfM6Sejq_5b4cbM,1082
6
+ langprotect_mcp_gateway-1.3.3.dist-info/METADATA,sha256=NEyg9tn2ie5HpHNjHmY2WfGsa2_mvc9ErxtQCQxPBKY,12856
7
+ langprotect_mcp_gateway-1.3.3.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
8
+ langprotect_mcp_gateway-1.3.3.dist-info/entry_points.txt,sha256=HpnUUuYLQva8b6gazUX0UJO9dFHq86e9gifQfLKpyWc,140
9
+ langprotect_mcp_gateway-1.3.3.dist-info/top_level.txt,sha256=UjNlX13ma4nwJXuEyi9eMX251c5rooeEao4zajX6ZHk,24
10
+ langprotect_mcp_gateway-1.3.3.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- langprotect_mcp_gateway/__init__.py,sha256=PedabfF6wZ_6KxuN60A4qz8T1gD9MszuXwhmrHlGH7I,510
2
- langprotect_mcp_gateway/gateway.py,sha256=YIggDJ7n0ctUsyyI1s567QFbH7cq5-6CAAdI1J8gQkY,30921
3
- langprotect_mcp_gateway/response_masker.py,sha256=ui1JusuPwuOKSfrDtt0FxLEGs_y512RcTG4gSz2-MT8,14702
4
- langprotect_mcp_gateway/setup_helper.py,sha256=vaE9SqF5oUdREooAUFUYXBWGC-3qHrG5pVfAddYnbOY,9752
5
- langprotect_mcp_gateway-1.3.2.dist-info/licenses/LICENSE,sha256=aoVP65gKtirVmFPToow5L9IKN4FNjfM6Sejq_5b4cbM,1082
6
- langprotect_mcp_gateway-1.3.2.dist-info/METADATA,sha256=FBsPxdfxSJxswil9dlwiCitxfW2rkTFPSkx360NO5Kc,12856
7
- langprotect_mcp_gateway-1.3.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
8
- langprotect_mcp_gateway-1.3.2.dist-info/entry_points.txt,sha256=HpnUUuYLQva8b6gazUX0UJO9dFHq86e9gifQfLKpyWc,140
9
- langprotect_mcp_gateway-1.3.2.dist-info/top_level.txt,sha256=UjNlX13ma4nwJXuEyi9eMX251c5rooeEao4zajX6ZHk,24
10
- langprotect_mcp_gateway-1.3.2.dist-info/RECORD,,