While some (including R' Vosner) are stringent. it is generally understood that to operate such cameras as well as walk past them is perfectly permitted.
The difference between surveillance cameras and filming a function is that when filming for security purposes, you don't actually want anyone (other than intruders) to be filmed.
Hence, it is considered a 'pesik reisha delo nicha lei' etc.
... R’ Moshe Feinstein (in a letter to R’ Yisroel Rozen of the Tzomet Institute) wrote that as the data is not being permanently recorded, it is at worst a derabanan. Although the cameras operate for security purposes, the passerby does not benefit from being photographed. One only benefits from the system when there’s an unwelcome intruder. Thus, one may walk in front of a camera on Shabbos as this is a case of pesik reisha delo nicha lei (see Shulchan Aruch OC 320:18) which is permitted in a rabbinic prohibition. Likewise, one may operate a surveillance camera. R’ Shlomo Zalman Auerbach (quoted in Ateres Shlomo 6, p57) concurs.