A method for training a machine-learning based model, the method comprising, performing by one or more processors, operations including: receiving first metadata regarding a previous modification to a system; extracting a first feature from the received first metadata; receiving second metadata regarding a previous incident related to the previous modification occurring in the system; extracting a second feature from the received second metadata; training the machine-learning based model to learn an association between the previous modification and the previous incident related to the previous modification, based on the extracted first feature and the extracted second feature; and automatically determining a risk level for the previous modification based on the extracted first feature, by using the trained machine-learning based model, based on the learned association between the previous modification and the previous incident related to the previous modification; the method further characterized in that the previous modification includes a modification to code of a software component of the system and the machine-learning based model is trained to reduce a risk level for a proposed modification to the system when the code is determined to be a critical code segment and the risk level is above a critical code predetermined threshold by determining blocking the previous modification, and to reduce the risk level for the previous modification when the code is of a non-critical code segment and the risk level is above a non-critical code predetermined threshold by determining a suggested action for reducing the determined risk level. receiving first metadata regarding a previous modification to a system; extracting a first feature from the received first metadata; receiving second metadata regarding a previous incident related to the previous modification occurring in the system; extracting a second feature from the received second metadata; training the machine-learning based model to learn an association between the previous modification and the previous incident related to the previous modification, based on the extracted first feature and the extracted second feature; and automatically determining a risk level for the previous modification based on the extracted first feature, by using the trained machine-learning based model, based on the learned association between the previous modification and the previous incident related to the previous modification; the method further characterized in that the previous modification includes a modification to code of a software component of the system and the machine-learning based model is trained to reduce a risk level for a proposed modification to the system when the code is determined to be a critical code segment and the risk level is above a critical code predetermined threshold by determining blocking the previous modification, and to reduce the risk level for the previous modification when the code is of a non-critical code segment and the risk level is above a non-critical code predetermined threshold by determining a suggested action for reducing the determined risk level. automatically determining a risk level for the previous modification based on the extracted first feature, by using the trained machine-learning based model, based on the learned association between the previous modification and the previous incident related to the previous modification; the method further characterized in that the previous modification includes a modification to code of a software component of the system and the machine-learning based model is trained to reduce a risk level for a proposed modification to the system when the code is determined to be a critical code segment and the risk level is above a critical code predetermined threshold by determining blocking the previous modification, and to reduce the risk level for the previous modification when the code is of a non-critical code segment and the risk level is above a non-critical code predetermined threshold by determining a suggested action for reducing the determined risk level.