This work describes a stochastic approach for the optimal placement of sensors in municipal water networks to detect maliciously injected contaminants. The model minimizes the expected fraction of the population at risk. Our work explicitly includes uncertainties in attack risks and population density, so that the resulting problem involves optimization under uncertainty. In our formulation, we include the number of sensors as first stage decision variables of a two-stage mixed-integer stochastic linear problem where the costs of sensors are included in the objective function. Since the model is integer in the first-stage, a generalized framework based on the stochastic decomposition algorithm allows us to solve the problem in a reasonable computational time. The paper describes the mixed-integer stochastic model and the algorithmic framework, and compares the deterministic and stochastic optimal solutions. The network used as our case-study has been derived through the water network ...