No, you cannot simply keep her security deposit, but you may sue her for the amount that she should have paid (presumably 1/2) of the lease for the period after she moved out. She is obligated to pay, as a signatory to the lease (and also pursuant to any agreements, including oral agreements, between the two of  you as to who would pay what), BUT you need a court determination of her liability (i.e. you need to sue her and win) to establish your right to the money. You cannot simply withhold her security from her without a judgment or settlement in your favor.