CBP can do whatever they want to anybody within a 100 mile radius of a border (maritime included) which is like, 70%+ of the US population.
Even though they’re complete fucking buffoons it’s a really good idea to not fuck with CBP, they get paid to fuck people up with impunity.