Secure Coding Practices in Java']Java: Challenges and Vulnerabilities

被引:86
作者
Meng, Na [1 ]
Nagy, Stefan [1 ]
Yao, Danfeng [1 ]
Zhuang, Wenjie [1 ]
Argoty, Gustavo Arango [1 ]
机构
[1] Virginia Tech, Dept Comp Sci, Blacksburg, VA 24061 USA
来源
PROCEEDINGS 2018 IEEE/ACM 40TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE) | 2018年
关键词
Secure coding; Spring Security; CSRF; SSL/TLS; certificate validation; cryptographic hash functions; authentication; authorization; StackOverflow; cryptography;
D O I
10.1145/3180155.3180201
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
The Java platform and its third-party libraries provide useful features to facilitate secure coding. However, misusing them can cost developers time and effort, as well as introduce security vulnerabilities in software. We conducted an empirical study on StackOverflow posts, aiming to understand developers' concerns on Java secure coding, their programming obstacles, and insecure coding practices. We observed a wide adoption of the authentication and authorization features provided by Spring Security-a third-party framework designed to secure enterprise applications. We found that programming challenges are usually related to APIs or libraries, including the complicated cross-language data handling of cryptography APIs, and the complex Java-based or XML-based approaches to configure Spring Security. In addition, we reported multiple security vulnerabilities in the suggested code of accepted answers on the StackOverflow forum. The vulnerabilities included disabling the default protection against Cross-Site Request Forgery (CSRF) attacks, breaking SSL/TLS security through bypassing certificate validation, and using insecure cryptographic hash functions. Our findings reveal the insufficiency of secure coding assistance and documentation, as well as the huge gap between security theory and coding practices.
引用
收藏
页码:372 / 383
页数:12
相关论文
共 34 条
[1]   You Get Where You're Looking For The Impact of Information Sources on Code Security [J].
Acar, Yasemin ;
Backes, Michael ;
Fahl, Sascha ;
Kim, Doowon ;
Mazurek, Michelle L. ;
Stransky, Christian .
2016 IEEE SYMPOSIUM ON SECURITY AND PRIVACY (SP), 2016, :289-305
[2]  
[Anonymous], 2014, AS PAC WORKSH SYST A
[3]  
[Anonymous], 2012, P 2012 ACM C COMP CO
[4]  
[Anonymous], 2012, P 2012 ACM C COMP CO
[5]  
[Anonymous], P 8 ACM C SEC PRIC W
[6]  
[Anonymous], 2016, THESIS
[7]   What are developers talking about? An analysis of topics and trends in Stack Overflow [J].
Barua, Anton ;
Thomas, Stephen W. ;
Hassan, Ahmed E. .
EMPIRICAL SOFTWARE ENGINEERING, 2014, 19 (03) :619-654
[8]  
Boonkrong S., 2012, J INFORM TECHNOLOGY, V8, P112
[9]   IRISH: A Hidden Markov Model to detect coded information islands in free text [J].
Cerulo, Luigi ;
Di Penta, Massimiliano ;
Bacchelli, Alberto ;
Ceccarelli, Michele ;
Canfora, Gerardo .
SCIENCE OF COMPUTER PROGRAMMING, 2015, 105 :26-43
[10]   Pozzolanicity of Calcined Clay [J].
Chatterjee, Anjan K. .
CALCINED CLAYS FOR SUSTAINABLE CONCRETE, 2015, 10 :83-89