A security deposit is ruled by the lease and nearby law, which can also set law for deductions, notices
https://www.hometalk.com/member/263210809/irene1937795
A defense deposit is ruled through the rent and native rules, which would possibly set legislation for deductions, notices, and the cut-off date for returning any stability.