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 None or path == "": continue if not Path(str(path)).exists():- Confidence
- 98% confidence
- Finding
- The use of eval() to resolve argument access is unnecessary and dangerous because it executes Python expressions at runtime. Today the accessor strings come from a constant dictionary, but this pattern creates a latent code-execution sink that becomes exploitable if the mapping is ever influenced by untrusted input or modified during maintenance; in a CLI/data-processing skill that may be run in automated environments, arbitrary code execution would have severe consequences.
