Starfleet security, even though they are allies and had been long time enemies, didn't know that Klingons carried weapon components in their armor or didn't confiscate it. See: "Heart of Glory"
Yes, which is an example of writing we would normally describe as careless, so why not continue to characterize it as such to this day? Starfleet is supposed to be competent except when someone is specifically called out as incompetent or corrupt, and the job of a writer is to make Starfleet look good as a rule. It’s like you’re settling for Star Trek forever being plotted at a certain level, instead of asking for one thing even if the show delivers another. Would the drama have been so different if Boimler could get in as himself but Mariner couldn’t?