Some years ago I was in a cruiseship and I saw a crew member confiscate an item from a passenger luggage when it went through the x-ray scanner. The crew member explained that the item was deemed dangerous, would be kept in custody for the whole cruise and would be returned to the passenger in his disembarkation port.
Last year I went to another cruise and I would like to buy a knife in one of the ports. I asked the security crew if I could bring the knife onboard and he told me that I could not. If i tried, it would be taken away and not returned to me (just like it happens in a commercial airplane).
Did someone ever brought a hazardous item to a cruiseship? Was it kept under crew member custody, or was it taken away? Is this a matter strctly a cruise company policy (up to the company to decide) or is it a common security measure?