a couple thoughts come to mind. One is a legal issue and the other is a judgement.
In many areas security deposits must be in separated bank accounts in the name of the tenant and must earn interest, that is a nod to the consumer that their advance deposit will be there at the end of the tenancy. if you did this, then the deposit is not rent until whatever restrictions are removed.
The second is the concept called "claim of right", it is similar to the above but not requiring segregation of funds. If you do NOT have unrestricted rights to the funds then that concept says that it is NOT income to you until such time as you do have unrestricted rights. For example, right at year end, you are cash basis and a client pays your invoice twice. The error is not discovered until January of the next year. The claim of right concept allows you to not include the second payment because you were not entitled to those funds. You refund the extra payment in the following year when it is discovered.