A methodological approach to the construction of models of typical decision support tasks for the formation of the composition of cybersecurity systems of companies in the context of digital transformation of production has been developed. The requirement to minimize possible damage from cybersecurity incidents is used as a criterion for the optimality of solutions. A general method for optimizing solutions is proposed, taking into account the nonlinear nature of the target functions of the models. The models and method are universal in nature and can be used in the development of specific methods for substantiating the composition of companies’ cybersecurity systems, taking into account the characteristics of possible threats. © 2022, The Author(s), under exclusive license to Springer Nature Switzerland AG.