Example-Based Vulnerability Detection and Repair in Java Code
Ying Zhang, Ya Xiao, Md Mahir Asef Kabir, Danfeng (Daphne) Yao, Na, Meng

TL;DR
Seader is an example-based tool that detects and repairs security-API misuses in Java code by inferring templates from insecure-secure code pairs, significantly improving vulnerability detection and fixing accuracy.
Contribution
We developed Seader, a novel example-based approach that infers API-misuse templates from code pairs to detect and repair vulnerabilities, addressing limitations of pattern-based tools.
Findings
Seader inferred 21 unique API-misuse templates and fixes from 28 code pairs.
Achieved 95% precision and 72% recall in vulnerability detection on a benchmark.
Correctly repaired 76 out of 77 manually checked cases in open-source projects.
Abstract
The Java libraries JCA and JSSE offer cryptographic APIs to facilitate secure coding. When developers misuse some of the APIs, their code becomes vulnerable to cyber-attacks. To eliminate such vulnerabilities, people built tools to detect security-API misuses via pattern matching. However, most tools do not (1) fix misuses or (2) allow users to extend tools' pattern sets. To overcome both limitations, we created Seader-an example-based approach to detect and repair security-API misuses. Given an exemplar <insecure, secure>code pair, Seader compares the snippets to infer any API-misuse template and corresponding fixing edit. Based on the inferred info, given a program, Seader performs inter-procedural static analysis to search for security-API misuses and to propose customized fixes. For evaluation, we applied Seader to 28 <insecure, secure> codepairs; Seader successfully inferred 21…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Reliability and Analysis Research · Advanced Malware Detection Techniques · Software Engineering Research
