I have to be careful here. I'm going to have to edit this carefully before I post.... :-/
I was not the pilot flying in a military submarine hunting aircraft. We were in the Atlantic looking for submarines and found one some distance from its friendly surface ships. We convinced the submarine to come up from undersea which it did, as per they way things normally go. We waited for the friends and submarine to group up and then made a low level pass (normally we are allowed to do this as long as we are not too low.) For whatever reason, the pilot in command made us display an attack configuration that the surface ships of course could see. The discussion grew very heated just before the run but I was not the pilot in command. We got really low and flew right above the submarine between the ships while watching all their guns aiming at us as we did.
Later, at the home base, three of us went to see the big boss.
Nothing except a very angry conversation happened and was written in reports (that affect our careers). This was during a time, about 25 years before you, when such an event was very much a "not a thing to do".