So security arrives to science. They find out the RD has killed someone with an esword. Let's assume the RD doesn't tell them the truth. Why would he? They book him, seems sensible whatever he claims.
But they don't know that you weren't involved in the matter. How uncommon is it for someone to be disarmed and killed with their own weapon? A paranoid security force could certainly interview the victim, at least.
The warden and the lawyer (whatever, neither are supposed to be beat cops but they're there today) are investigating the crime scene. Sensible. They might find more bodies, or be waiting for the detective to turn up and scan something, or whatever.
Now, picture this: some scientist shows up. Maybe they know he was the murder victim, maybe they don't. Maybe he's got blood all over him, maybe not. Maybe the RD has been spouting lies about a traitor in science that he got the gear from, or had to exchange documents with, maybe not. Whatever the case, he's telling them to get out. Didn't he know there was a murder here? At the very least, they're suspicious. And at that point, a search is entirely reasonable. He's a scientist: for all they know, he has a backpack full of bombs. No sense in asking first: that's asking to die with a lot of criminals on this station.
Search is fine here. Perma for having bombs, not so much. You were, after all, in the department you made them. Although telling security to leave the room, with bombs in your pack? Implication is you were going to teleport them. What the hell does all of this mean? It means the search, however random it seemed to you, might well not have seemed as random to them. Punishment aside, a ban on random searches wouldn't have stopped most officers from searching you.
Helios wrote:What about using someone's department as a justification? I.E. one scientist is a confirmed cultist, so you search the rest.
You can take this into an extreme in the OP's case, and say that because an assistant broke into a department that day, they are searching them because they're also an assistant
Seems entirely legitimate to me. Hell, it's legitimised by something as simple as a [departmental jumpsuit] appearing on an emagged door.
Frankly once you've got to the point there's an active cult/gang/rev any kind of group antagonist you ought to be raiding, searching, and implanting departments as a whole anyway. It's invasive, it's unpleasant, but it's also the best way to not get killed by an escalating threat.
If you live in a country with common law (which is likely since you speak English) you do deal with probable cause.
That doesn't mean it's called that, and it doesn't mean the concept has the same weight. In the US, that is a constitutional right, which is a big deal. You need probable cause for a warrant, a personal search, a property search.
In the UK, the corresponding term for what's called 'stop and search' is "reasonable grounds": suspicion of drugs, weapons, tools, or stolen goods. The UK does not have a written constitution, and you don't need "reasonable grounds" if it's been approved by a senior officer. Senior officers might approve for a bunch of reasons, like you being in a specific area, or them being worried violence might happen. But the point is they aren't the same things, necessarily, as in the US. And you can't rely on it being upheld to the same degree. A bit like freedom of speech in that way. Heavily enforced in the US, a bit more loosey-goosey in the Old World.