The commission is empowered to compel persons about to undertake any work which may be dangerous, or is likely to involve liability upon the city, to execute a bond with good and sufficient security, conditioned for the payment of any damage that may be sustained by any person by such work.