In this paper, we are interested in resourceallocation for energy constrained and security-criticalembedded systems. Tasks in such systems need to besuccessfully executed under certain energy budget and berobust against serious security threatens. Different to formerenergy minimal scheduling problem, we introduce a newoptimization problem for a set of tasks with energyconstraint and multiple security choices. We present adynamic programming based approximation algorithm tominimize the security risk of the system while statisticallyguaranteeing energy consumption constraints for givenenergy slack ratio. The proposed algorithm is very efficientin both time and space dimensions, and achieves goodsolutions. Extensive simulations demonstrate the superiorityof our algorithm over other approaches.