Port security refers to the defense, law and treaty enforcement, and counterterrorism activities that fall within the port and maritime domain. It includes the protection of the seaports themselves, the protection and inspection of the cargo moving through the ports, and maritime security.Internationally, port security is governed by rules issued by the International Maritime Organization and its 2002 International Ship and Port Facility Security Code.