Cal. Health & Safety Code § 11304
(a) An individual possessing a controlled substance or a controlled substance analog who is engaged in obtaining controlled substances checking services from a controlled substance checking service provider pursuant to this section shall not be subject to any criminal or civil penalty or investigation based solely on the individual’s utilization of a controlled substance checking service or actions authorized by this act, including, but not limited to, any of the following: