The Pentagon has warned military personnel to avoid at-home DNA tests over security concerns.