Gunmen ambushed a security personnel in Nigeria's northwestern Zamfara state and killed at least eight people, the state's governor said.