I have been out of the Navy for 5 years now, but I think you are referring to Visit, Board, Search and Seizure (VBSS) teams. They are used to board suspect vessels to inspect their papers and check for contraband, which can be used to fund or supply terrorism. Unfortunately, these teams are normally only used on surface combatants (LCS, frigates, destroyers and cruisers), not nuclear-powered submarines or aircraft carriers. The other possibility is Anti-Terrorism/Force Protection (AT/FP) teams, which can be manned in foreign waters/ports to enhance ship security. Because nukes still have watches to man even when in port, they are typically not used for these positions.