Well, it all depends. Generally speaking, no. The Fourth Amendment plays into it big time. The Fourth Amendment prohibits "unreasonable searches and seizures."
Without a description of the perpetrator the police cannot just start searching everybody. "In justifying the particular search the police officer must be able to point to specific and articulable facts which, taken together with rational inferences from those facts, reasonably warrant the search. In other words, reasonable suspicion must be based on "specific and articulable facts" and not merely upon an officer's hunch. This permitted police action has subsequently been referred to as a "stop and frisk," or simply a "Terry frisk".
But, if they violate your rights and don't arrest you what are you going to do about it? Not much.
If they violate your rights, you can always sue. Several cities here in Colorado found out the hard way that no, cops cannot violate the civil rights of law-abiding carriers without subjecting their employing municipalities to some rather stiff fines.
Those violations, however, did not occur in the presence of a mass shooting. They were stand-alone events where the cops were abusing their authority.
Color of law, you touched on it. In a mass shooting situation, one has to ascertain what constitutes a "reasonable search and seizure."
SCENARIO 1: Four people are in a locked room. The lights go out. There's a bang. The lights come on and the remaining three people see the fourth, shot dead, lying on the floor. One of them calls 911. All three are sequestered. The room is void of a weapon and there's no place to hide it. Two consent to a search and are found void of any weapons. The third person refuses to be searched.
In this case, it is reasonable to assume the third person is armed. He is force-searched and found to have the smoking gun, tries to get it thrown out due to 4th Amendment violation.
Given the circumstances, the judge would be well within his rights to deny the fourth's claim.
SCENARIO 2: Same as scenario 1, but only one consents to a search. Now we have two people who are force-searched.
Was it reasonable to force-search them both knowing that the odds were 50-50 that one of them was the perpetrator?
SCENARIO 3: Same as scenario 1, but there's thirty people in the room and half refuse to be searched. Are the police justified in searching all 15 of them? Remember, it's a closed room, so they
know at least one of them is the culprit.
SCENARIO 4: Same as scenario 3, but the room isn't locked, meaning someone could have slipped out just as someone could have slipped in after hearing the bang, while the lights were out.
You see where I'm going with this...
SCENARIO 5: Two suspects set off a bomb during a marathon in a major U.S. city. The mayor essentially declares martial law and orders door-to-door searches. Many people could have come and gone and there's no hard evidence that the perpetrators are even in the area.
I think it's a judgement call, but here's how I'd call it:
5: Unreasonable and a ridiculous violation of the 4th Amendment
4. Unreasonable as you have not determined who has come and gone
3. Unreasonable. At what point, how many people, do you consider it "reasonable?" 1? 3? 15? What about Walt Disney World Magic Kingdom, which averages roughly 50k visitors per day? Are they doing to lawfully search all 52,964?
2. Unreasonable! Whether it's 15 potential suspects or just 2, the situation simply does not meet the requirements for our 4th Amendment: "...no Warrants shall issue, but upon probable cause, supported by Oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized." Whether 2 people or 50,000, they do not know. They're just guessing.
1. Reasonable. This is the only situation where law enforcement can logically determine who has the weapon.
Corollary: A guy wearing a mask, black jacket, and jeans shoots a store owner and is observed by law enforcement to run around the corner. Law enforcement loses sight of him but gives chase and as they round the corner, they spot a man wearing a black jacket and jeans sitting on some steps half a block away. They arrest him and forcibly search him.
Is this legal? Or did they just violate his rights?
Actually, they violated his rights. They can make contact, and if something comes to light during the contact that gives them reasonable articulable suspicion that this is the same guy, then they can arrest him, search him, Mirandize him, and bring him downtown for questions. But with no more defining characteristics than a black jacket and jeans, quite common in the neighborhood...