AI Ethics and Security in Legal Automation