@enclave-vm/ast
Advanced tools
+1
-1
| { | ||
| "name": "@enclave-vm/ast", | ||
| "version": "2.10.0", | ||
| "version": "2.10.1", | ||
| "description": "A production-ready AST security guard for JavaScript - validate, protect, and enforce code safety with extensible rules", | ||
@@ -5,0 +5,0 @@ "author": "AgentFront <info@agentfront.dev>", |
@@ -55,2 +55,11 @@ import { ValidationRule, ValidationContext, ValidationSeverity } from '../interfaces'; | ||
| /** | ||
| * Check if a call expression could be coercing a dangerous string | ||
| * Detects patterns like: | ||
| * - String(['constructor']) - array coercion | ||
| * - String.fromCharCode(...) - character code building | ||
| * - ['constructor'].toString() - array method coercion | ||
| * - ['constructor'].join('') - array join coercion | ||
| */ | ||
| private isSuspiciousCoercionCall; | ||
| /** | ||
| * Try to evaluate a string concatenation expression | ||
@@ -57,0 +66,0 @@ * Returns the result if it's a simple string concat, or null if too complex |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
618464
0.84%16919
0.68%