New law will ‘prevent, stop and punish’ activities endangering national security