"The price of lawful public dissent must not be a dread of subjection to an unchecked surveillance power. Nor must the fear of unauthorized official eavesdropping deter vigorous citizen dissent and discussion of Government action in private conversation." From https://en.wikipedia.org/wiki/United_States_v._United_States...
And "These Guidelines do not authorize investigating or collecting or maintaining information on United States persons solely for the purpose of monitoring activities protected by the First Amendment or the lawful exercise of other rights secured by the Constitution or laws of the United States" from the Attorney General's guidelines for the FBI, which were originally created because of said case.
Much as how there's a legal distinction between firing someone for no reason and firing someone for an illegal reason, there is certainly reasonably interpretable legal precedent that investigating someone solely for their protected first amendment activities may violate their first and fourth amendment rights.
Of course, IANAL, but that doesn't seem to stop many people on the internet.