paper-with-me

홈 › Papers

An Investigation into Misuse of Java Security APIs by Large Language Models

2024-04-04 · Zahra Mousavi, Chadni Islam, Kristen Moore, Alsharif Abuadbba, Muhammad Ali Babar

The increasing trend of using Large Language Models (LLMs) for code generation raises the question of their capability to generate trustworthy code. While many researchers are exploring the utility of code generation for uncovering software vulnerabilities, one crucial but often overlooked aspect is the security Application Programming Interfaces (APIs). APIs play an integral role in upholding software security, yet effectively integrating security APIs presents substantial challenges. This leads to inadvertent misuse by developers, thereby exposing software to vulnerabilities. To overcome these challenges, developers may seek assistance from LLMs. In this paper, we systematically assess ChatGPT's trustworthiness in code generation for security API use cases in Java. To conduct a thorough evaluation, we compile an extensive collection of 48 programming tasks for 5 widely used security APIs. We employ both automated and manual approaches to effectively detect security API misuse in the code generated by ChatGPT for these tasks. Our findings are concerning: around 70% of the code instances across 30 attempts per task contain security API misuse, with 20 distinct misuse types identified. Moreover, for roughly half of the tasks, this rate reaches 100%, indicating that there is a long way to go before developers can rely on ChatGPT to securely implement security API code.

📄 PDF Abstract BibTeX arXiv:2404.03823

Code (1)

llm-security-study/chatgpt 공식 구현

Tasks

Code Generation

Similar Papers 제목 키워드 기반

Can ChatGPT replace StackOverflow? A Study on Robustness and Reliability of Large Language Model Code Generation

2023-08-20 · Li Zhong, Zilong Wang

Recently, the large language models (LLMs) have shown extraordinary ability in understanding natural language and generating programming code. It has been a common practice of software engineers to consult LLMs when enco…

Code GenerationLanguage ModelingLanguage ModellingLarge Language Model

ChatGPT's Potential in Cryptography Misuse Detection: A Comparative Analysis with Static Analysis Tools

2024-09-10 · Ehsan Firouzi, Mohammad Ghafari, Mike Ebrahimi

The correct adoption of cryptography APIs is challenging for mainstream developers, often resulting in widespread API misuse. Meanwhile, cryptography misuse detectors have demonstrated inconsistent performance and remain…

Prompt Engineering

Dragon-Alpha&cu32: A Java-based Tensor Computing Framework With its High-Performance CUDA Library

2023-05-15 · Zhiyi Zhang, Pengfei Zhang, Qi Wang

Java is very powerful, but in Deep Learning field, its capabilities probably has not been sufficiently exploited. Compared to the Java-based deep-learning-frameworks, the Python-based (PyTorch, TensorFlow, etc) are undou…

Deep Learning

Mining Software Components from Object-Oriented APIs

2016-06-02 · Anas Shatnawi, Abdelhak Seriai, Houari Sahraoui, Zakarea Al-Shara

Object-oriented Application Programing Interfaces (APIs) support software reuse by providing pre-implemented functionalities. Due to the huge number of included classes, reusing and understanding large APIs is a complex …

Object

GitHub Considered Harmful? Analyzing Open-Source Projects for the Automatic Generation of Cryptographic API Call Sequences

2022-11-24 · Catherine Tony, Nicolás E. Díaz Ferreyra, Riccardo Scandariato

GitHub is a popular data repository for code examples. It is being continuously used to train several AI-based tools to automatically generate code. However, the effectiveness of such tools in correctly demonstrating the…