jeecg-codegen-new
Audited by Socket on Sep 22, 2026
3 alerts found:
Anomalyx3The code appears to be a legitimate template-based code generator and contains no clear malware indicators or intentional obfuscation. It has a meaningful path traversal/arbitrary file write risk: expanded output paths and #segment# filenames are not validated to remain within outputDir, and stylePath is not constrained to templateRoot. These issues require untrusted templates or context data to exploit. Add normalized real-path containment checks for templateRoot/styleRoot and every output/segment path, and reject absolute paths and traversal components.
No evidence of malware or intentional malicious behavior is present. The significant security concern is SQL injection risk from raw `${key}` interpolation in the dynamic query and, secondarily, from any untrusted input reaching generated table or column identifiers. Restrict query keys to a fixed allowlist and ensure all schema metadata is trusted and validated.
代码内容主要是字典匹配和代码生成规则,不显示恶意软件行为,也未发现数据窃取或持久化机制。应移除硬编码的 `root/root` 凭据,并确保 `{dbname}` 及所有进入 shell/SQL 和代码模板的数据经过严格校验、参数化处理和适当转义。