# Embedding Security Awareness in IoT Systems: A Framework for Providing Change Impact Insights
## 3 Approach
### Generate System-Call Dependency Graph (ScD Graph) and Calculate Importance Factor (IF)  
The outcome of the mapping technique pinpoints the affected functionalities and security requirements due to the changes in the conditions of the system's attributes. It also includes process importance, which is the _IF_ of the process. _IF_ is defined as the significance of those processes in continuing the system's operation. We model the IoT system's internal architecture and interdependencies among the processes as a form of call graph, \(G=(V,E)\) where \(V\) is the set of nodes in the graph representing the processes in IoT system, and \(E\) is the set of directed edges connecting the nodes, expressing the calling relationship among the processes, and thus the control flow from process to process. An edge \(e_{ij}\) in E is an ordered pair of nodes \(v_{i}\), \(v_{j}\) \(\in\)\(V\), representing the control flow from node \(v_{i}\) to \(v_{j}\). To construct the call graph, we collect the execution traces of the processes in the IoT system, which is the IoT-based smart irrigation testbed in our case. The execution trace records all the processes being invoked and the flow of control, starting from the sensor reading data to finally activating the actuators after analyzing the data if needed. Figure 6: Generated JSON report (partial) in a structured form. Our testbed call graph includes 15 processes, as shown in the graph in Figure 7, in which there are three processes involved in the Physical Layer, so three nodes are included in the call graph (represented in green circles). Similarly, there are five nodes (yellow circles) representing the processes in the Edge Layer, six nodes from the Cloud Layer (blue circles), and one node for the process from the Application Layer (no fill circle). The edges reflect how the processes are interconnected in the entire architecture from the Physical Layer to the Application layer. For example, the node, \(v_{DecidetoTriggerActuator}\) represents the process _DecidetoTriggerActuator_ from the Cloud Layer and is connected both with the node \(v_{SentTriggerToActuator}\) from the Edge Layer and \(v_{ShowAnalysisResult&TriggerDecision}\) from the Application Layer, since the _DecidetoTriggerActuator_ process is used for both notifying the application user about the farm condition and the activation of actuator via _ShowAnalysisResult&TriggerDecision_ process and, on the other hand, transmitting signal to the Edge Layer's process _SendTriggerToActuator_ to enable the actuator residing in the Physical Layer. So, an edge, \(e_{DecidetoTriggerActuator}\) and \(v_{ShowAnalysisResult&TriggerDecision}\). And another edge, \(e_{DecidetoTriggerActuator}\), is connecting nodes \(v_{DecidetoTriggerActuator}\) and \(v_{SentTriggerToActuator}\). The direction of the edge reflects how the control flows in the operation. Since the _DecidetoTriggerActuator_ process notifies the user about the decision of activating actuator, the control flows from _DecidetoTriggerActuator_ to _ShowAnalysisResult&TriggerDecision_ process. On the other hand, the _DecidetoTriggerActuator_ process also receives a command from the user when the user tries to override the activation of actuator decision. Thus, there is a control flow from _ShowAnalysisResult&TriggerDecision_ to _DecidetoTriggerActuator_. So, the edge \(e_{DecidetoTriggerActuator}-\)_ShowAnalysisResult&TriggerDecision_ is bi-directional. But, the edge \(e_{DecidetoTriggerActuator}-\)_SendTriggerToActuator_ is unidirectional, reflecting the control flow from _DecidetoTriggerActuator_ to _SendTriggerToActuator_. We have assigned weight to each edge based on how many layers in IoT are merged together via this edge and what is that layer's priority. As we know, IoT architecture includes multiple layers to accommodate diverse components, each of which is responsible for specific needs [2]. There are some processes involved in connecting one layer with another layer in order to ensure a seamless and efficient operation of the IoT system.