The same regs and penalties and TSA prohibited items apply as for a 121 airline, for both the passenger and the operator, if it’s found out after the fact. Smaller operators may not care and turn a blind eye, but if it’s a larger (>12,500lbs) aircraft, the operator will be under a security program administered by the TSA, and including mandatory duty to report and specifying various actions that they must take. This is regardless/independent of whether it’s sterile or non-sterile boarding (security screening).
I’ve had a passenger bring a firearm (CCW) aboard undeclared once before (that I know of *), and had to ask passengers to place visible knives in their ‘checked’ (external) baggage prior to boarding. Not worth the risk, but you do you. We don’t really personally care until it comes out, becomes blatantly visible, or goes off.
*Unfortunately for this passenger, it (loaded handgun) fell out of his pocket/holster onto the floor of the galley in front of the whole crew. If I’d been the only one to see it/notice I would have sympathetically shared some advice and that might could have been the end of it. Unfortunately that wasn’t an option once the entire crew (and other passengers) saw it. My captain (Cpt. Legal Beagle) reported it and started a great big snowball of shit rolling downhill. Not a position I ever want to be put in again.
Best solution is just put it inside your bag prior to the flight. Where that bag goes, I’m not saying really matters, but very unlikely you’ll need a knife during the flight, right? If you really do, we’ll let you borrow the crash axe in the cockpit.