High-speed rail project HS2 says its workers have been put at risk.