I was thinking of the infectious disease flag that ships raise to warn others that they have not been certified by the local port authority as being safe. Formerly, the all-yellow flag “Q” was used to indicate a quarantine (”yellow jack” for yellow fever, giving that disease that particular nickname). The “Q” flag is now used to indicate a request for the port authority to come aboard and confirm that all is well. The yellow and black flag “L” is now used to indicate a current quarantine.
We still use the yellow quarantine flag. Once you enter foreign waters you must fly a yellow flag indicating that the vessel has not been inspected. Make port, no one disembarks except the master of the vessel. The master takes everyone's paperwork (and $$) thru C/I where they can opt to do a physical inspection if they choose. Once cleared, you fly the flag of that country as a courtesy indicating the vessel is lawfully in-country.