The Department of Homeland Security allegedly ran a sweeping, politically motivated surveillance campaign against protesters, unions and nonprofits with no criminal basis, according to a court filing by a lawyer for a defendant charged in the protests.