Dynamic attribute access via getattr()
Low
- Category
- Dangerous Code Execution
- Content
def status_current(p: ProxmoxAPI, node: str, kind: str, vmid: str): # kind is usually 'qemu' or 'lxc' endpoint = getattr(p.nodes(node), kind) return endpoint(vmid).status.current.get() def action_vm(p: ProxmoxAPI, node: str, kind: str, vmid: str, action: str):- Confidence
- 90% confidence
- Finding
- endpoint = getattr(p.nodes(node), kind)
