In theory, a derivative lawsuit is filed on behalf of the corporation, so logically the corporation should be aligned as a plaintiff. For most purposes tis is largely irrelevant, but it does matter where the suit is filed in federal court on diversity grounds or where defendants seek to remove a case from state to federal court. Keith Paul Bishop discusses the relevant law here.