First is to know your state law
https://www.thebalancesmb.com/massachusetts-security-deposit-law-2125077
Landlords in Massachusetts may be allowed to keep all or a portion of a tenant’s security deposit for the following reasons:
- Unpaid rent.
- Unpaid water bills.
- Any unpaid real estate taxes that the tenant was obligated to pay.
- Damage in excess of normal wear and tear.