SECURITY AGREEMENT AND GUARANTY