My concerns are that terrorist board it an leave a package aboard to be brought into an American port......
A UAV or subsurface drone would seem safer for such missions.
Somewhat more secure, but couldn’t something malicious still be affixed to a submarine with a cable or magnet? The vessels need to have the capability to self-survey.