Security of Constrained Cyber-Physical Systems