Does the United States Constitution have any amendments related to foreign bases? Technically foreign bases aren't U.S. territory, but they must have some laws.
If the base is on a foreign territory, the rules are a union of:
UCMJ - United States Uniform Code of Military Justice (applicable to uniformed personnel)
Whatever local laws may be applicable based on United States' treaties/agreements with the placement nation
For those interested in a government's official explanation of the nitty gritty of how this works, you can read through Army Pamphlet 360-544: YOU AND THE LAW OVERSEAS from 1989.