Diplomatic immunity
Diplomatic immunity was a concept in diplomatic law to protect certain ambassadors, diplomats and their spouses from punishment for crimes in the performance of diplomacy.

While concealing Spock from the authorities, Amanda Grayson noted that as the wife of the Vulcan Ambassador, she had the legal authority to invoke diplomatic immunity to protect Spock from extradition under Federation law. 
Sarek noted that authority only applied without the objection of the Ambassador. ()

During the Battle near Xahea in 2257, Queen Me Hani Ika Hali Ka Po invoked diplomatic immunity for stealing a  shuttlecraft. ()

During the Starfleet investigation into the disappearance or destruction of the Discovery, Spock noted in a personal log framed as a letter to Michael Burnham, that Sarek and Amanda were diplomatically immune to interrogation as part of the inquiry. ()

External link

Law