Dynamic attribute access via getattr()
Low
- Category
- Dangerous Code Execution
- Content
else: role = "assistant" try: original = getattr(mod, attr_name) # Create wrapper closure def make_wrapper(orig, r): def wrapper(*args, **kwargs):- Confidence
- 93% confidence
- Finding
- This dynamic attribute access is part of a broader auto-record feature that scans loaded modules and monkey-patches arbitrary callables. In this context, the danger is not `getattr()` by itself, but that it enables interception of unrelated module methods and passive capture of message content without clear scope limits or consent.
