Dynamic attribute access via getattr()
Low
- Category
- Dangerous Code Execution
- Content
module_path = '.'.join(class_name.split('.')[:-1]) cls_name = class_name.split('.')[-1] mod = importlib.import_module(module_path) target_class = getattr(mod, cls_name, None) if target_class: target_module_path = class_name except Exception:- Confidence
- 75% confidence
- Finding
- target_class = getattr(mod, cls_name, None)
