The rules in this Chapter respecting bail are applicable to all such undertakings when entered into in the course of a criminal action, whether before or after an indictment, in every case where authority is given to any court, judge, magistrate, or other officer, to require bail of a person accused of an offense, or of a witness in a criminal action.
Tex. Code Crim. Proc. § 17.38