Safety and Security in Networked Robotics Systems via Logical Consensus,