In the modern society, with the high-speed development of computer science and technology, the wave of the Internet economy is around the world, the use of computer software in every corner of our lives, various applications emerge in endlessly, people pay more and more attention on software security. Tainted data which comes from the external input variables and has been used by some function without detection of legitimacy is a kind of code security defect. In this paper, the author provides a detailed analysis and classification on the cause of the security defect, and introduces a method of tainted data detection based on static code analysis. The detection method preprocesses the code firstly to create abstract syntax tree, symbol table, control flow graph and function call graph. To analysis the relationship between the function calls, the author uses the function summary instead of expansion of the functions. In the last, by using this method to detect some open source projects, the experiment shows that this method has both lower positive rate and negative rate.
[1]
Brian W. Kernighan,et al.
The C Programming Language
,
1978
.
[2]
Brian W. Kernighan and Dennis M. Ritchie,et al.
“The C Programming Language”, 2nd Edition, Pearson Education, 1988.
,
2015
.
[3]
Andy German,et al.
Static Code Analysis Identification of Safety-critical Software Why Use Static Code Analysis? Software Static Code Analysis Lessons Learned
,
2022
.
[4]
Ron Patton,et al.
Software Testing
,
2000
.
[5]
Witold Pedrycz,et al.
A comparative analysis of the efficiency of change metrics and static code attributes for defect prediction
,
2008,
2008 ACM/IEEE 30th International Conference on Software Engineering.
[6]
Panagiotis Louridas,et al.
Static code analysis
,
2006,
IEEE Software.