The Constitution, but beyond that:
“We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness.—That to secure these rights, Governments are instituted among Men, deriving their just powers from the consent of the governed, —That whenever any Form of Government becomes destructive of these ends, it is the Right of the People to alter or to abolish it, and to institute new Government, laying its foundation on such principles and organizing its powers in such form, as to them shall seem most likely to effect their Safety and Happiness.”
My Answer is also the Constitution but I would add...
...as written and originally understood and intended.
Therefore, any nominee of SCOTUS Justice should be investigated and queried based on their adherence and commitment to 1) read the Constitution as is and 2) if there’s a genuine dispute about the meaning of what is written, a good faith effort to find, not what the Justice himself thinks is moral and good, but the original understanding and intent of the ratifiers.
Such dedication and diligence demands a rare thing these days, especially in government: a selfless faithfulness in applying the facts of the case to the law (the Constitution) as is and intended, leaving it to others (the legislature) to change the law (Constitutional amendments). The constitutional duty of a judge or Justice is NEVER to change the law but apply it as is and as intended.
Also, such dedication and diligence, as well as understanding the Constitution among the general population, could turn SCOTUS back into the judicial branch the Constitution intended it to be: NOT to make national law, but a judicial body to decide certain “cases and controversies” whose decisions IF CONSTITUTIONAL are limited and binding ONLY on the parties of that particular case and a precedent for subsequent cases with similar facts and questions of law.
As with the rest of the federal government, the power of SCOTUS has expanded into a kind of oligarchy, way beyond what the ratifiers contemplated.