eval() call detected
High
- Category
- Dangerous Code Execution
- Content
if getattr(args, "synthetic", False): return 0 for flag, accessor in FILE_ARGS.items(): path = eval(accessor) if path is not None and not Path(path).exists(): print(f"ERROR: --{flag} not found: {path}", file=sys.stderr) return 2- Confidence
- 98% confidence
- Finding
- The use of eval() to resolve argument access is unnecessary and unsafe because eval executes Python expressions, not just simple lookups. Although FILE_ARGS is currently hardcoded, this pattern creates avoidable code-execution risk if the mapping is ever modified or made user-influenced, and it weakens the security posture of a tool that processes untrusted inputs.
