Check out Martinez-Fuerte at 560, which ACLU (at least in California) says is controlling, and which states that secondary inspection areas can be used only for routine and limited inquiries into residence status, and that the areas are used exclusively for traffic alleviation, not to facilitate actual searches, which the case (at 558) says are disallowed.
I'm certainly never going to claim that CBP doesn't push its authority, or even abuse it outright. I assume they somewhat routinely do that. Patrick Leahy got pulled over 125 miles from a border a few years ago (that had to have been fun to watch).
I'm just saying that there's a mythology about the "100 mile wide Constitution-free zone" which is not useful or productive and deserves to be punctured whenever it's brought up. A lot of what people believe CBP can do by dint of being within 50 miles of a border would, if it occurred, in fact be unlawful, and should be challenged on those terms. Not in a Wesley Snipesian idiosyncratic "originalist" sense of the word unlawful, but straight-up normal-lawyer bring-a-case unlawful.