An action by the surety-obligor against an indemnitor, seeking retention of security deposited by the latter with the former or enforcement of any indemnity agreement of a kind described in this sub-paragraph, will not lie except with respect to agreements and security specified in the justifying affidavit.
N.Y. Crim. Proc. Law ยง 520.20