Exploring the relationship between architecture coupling and software vulnerabilities A Google Chrome case study investigates the relationship between software vulnerabilities and component metrics like code churn and cyclomatic complexity, as well as architecture coupling metrics direct, indirect, and cyclic coupling.

The study measured the Chrome software architecture in terms of traditional software metrics; source lines of code (SLOC), cyclomatic complexity (MCCABE), commenting ratio (COMMR), and the amount of activity (CHURN) spent in each file to fix “regular” defects (not vulnerabilities). They also calculated the different coupling measures; direct (DFI & DFO), indirect (IndFI & IndFO), and cyclic (CYCLIC). All metrics and the architecture visualization (Fig. 2) were derived using a commercial analysis tool from Silverthread3 and each metric is explained in section III. All variables are measured as positive integers, except COMMR which is a positive rational number and CYCLIC which is a binary (1/0) number

From the table, we can see that CHURN is highly correlated with source lines of code (SLOC), cyclomatic complexity (MCCABE), and direct fan-out (DFO). That is, files that are associated with many changes in general (excluding vulnerability bug changes) also have more source lines of code, higher cyclomatic complexity, and a higher number of direct fan-out dependencies. Further, we see that all of our software metrics, including the different types of coupling, are significantly correlated with vulnerability bug files (VULN). Namely, files that have been changed a lot, that have a low comment ratio, many source lines of code, high cyclomatic complexity, and high coupling are all associated with vulnerability bugs