The Coast Guard Act Article 8

To check smuggling, crack down illicit entry or exit, and investigate any crime, the personnel of the Coast Guard may conduct searches on the nearest roads leading to the Coast, if necessary.
中文原文 海岸巡防法第8條
海巡機關人員執行查緝走私、非法入出國及其他犯罪調查職務,必要時得於最靠近進出海岸之交通道路,實施檢查。

English translation for reference only; the Chinese text prevails. Not legal advice.