Fog computing solutions significantly reduce communication delays in IoT-based cybersystems. They enable the development of large-scale IoT systems for transport, energy, and smart cities. Such an infrastructure must be highly secure. Therefore, risk management problems are actual there. One of the crucial features of fog computing networks is dynamic topology. Common approaches to cybersecurity do not consider topology change because many computer networks cannot be altered in this way just for security reasons. When managing the fog computing network a security specialist should know how its overall security changes with topology altering because understanding the extent and mechanism of topology's impact on fog computing system security increases the effect of security improvement costs. This study utilizes findings related to the impact of complex systems' structures on their overall risk to address enhancements in fog computing network security. It examines upper bounds of risk deviation for an approximate solution concerning the optimal placement of network nodes in a star-shaped topology and introduces a method for swift risk assessment in a fog computing network with this kind of topology.