Here is language excerpted from the B Lab Model Statute. Like other model statutes, it is designed for states to be able to easily adopt it and insert it into their statutory schema.
§ 305. Right of action.
(a) General rule. – Except in a benefit enforcement proceeding, no person may bring an action or assert a claim with respect to:
(1) failure of a benefit corporation to pursue or create general public benefit or a specific public benefit set forth in its articles of incorporation; or
(2) violation of an obligation, duty, or standard of conduct under this [chapter].
(b) Limitation on liability of corporation. – A benefit corporation shall not be liable for monetary damages under this [chapter] for any failure of the benefit corporation to pursue or create general public benefit or a specific public benefit.
(c) Standing. – A benefit enforcement proceeding may be commenced or maintained only:
(1) directly by the benefit corporation; or
(2) derivatively [in accordance with [cite sections of business corporation law on derivative suits]] by:
(i) a person or group of persons that owned beneficially or of record at least 2% of the total number of shares of a class or series outstanding at the time of the act or omission complained of; or
(ii) a person or group of persons that owned beneficially or of record 5% or more of the outstanding equity interests in an entity of which the benefit corporation is a subsidiary at the time of the act or omission complained of.
(d) Beneficial ownership. – For purposes of this section, a person is the beneficial owner of shares or equity interests if the shares or equity interests are held in a voting trust or by a nominee on behalf of the beneficial owner.