Merge "Add security checks for new API"