eval() call detected
High
- Category
- Dangerous Code Execution
- Content
Returns exit code (0 = ok, 2 = arg error).""" # File existence 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() on a string to access CLI argument values is unsafe because it executes Python expressions rather than performing simple attribute lookup. In this file the strings come from a hardcoded map, which reduces immediate exploitability, but it still creates an unnecessary code-execution primitive that could become dangerous if the mapping is later modified, made data-driven, or influenced indirectly.
