mlsanityData to 7 Oct 2026

CodeCloak: A Method for Evaluating and Mitigating Code Leakage by LLM Code Assistants

arXiv 2404.09066 ↗First posted 13 Apr 2024cs.CR cs.CL cs.LGcited by 3

Not on the map. Why?

Abstract (arXiv)

LLM-based code assistants are becoming increasingly popular among developers. These tools help developers improve their coding efficiency and reduce errors by providing real-time suggestions based on the developer's codebase. While beneficial, the use of these tools can inadvertently expose the developer's proprietary code to the code assistant service provider during the development process. In this work, we propose a method to mitigate the risk of code leakage when using LLM-based code assistants. CodeCloak is a novel deep reinforcement learning agent that manipulates the prompts before sending them to the code assistant service. CodeCloak aims to achieve the following two contradictory goals: (i) minimizing code leakage, while (ii) preserving relevant and useful suggestions for the developer. Our evaluation, employing StarCoder and Code Llama, LLM-based code assistants models, demonstrates CodeCloak's effectiveness on a diverse set of code repositories of varying sizes, as well as its transferability across different models. We also designed a method for reconstructing the developer's original codebase from code segments sent to the code assistant service (i.e., prompts) during the development process, to thoroughly analyze code leakage risks and evaluate the effectiveness of CodeCloak under practical development scenarios.

Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 24 of its 35 references that are in the map. First posted on arXiv 13 Apr 2024.

Builds on

24 of 35 references.

References · 24

  1. 2017Proximal Policy Optimization Algorithmscited by 14,441
  2. 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
  3. 2022Prompt-to-Prompt Image Editing with Cross Attention Controlcited by 2,409
  4. 2020Extracting Training Data from Large Language Modelscited by 2,144
  5. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  6. 2023A Survey on Evaluation of Large Language Modelscited by 1,227
  7. 2023StarCoder: may the source be with you!cited by 790
  8. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
  9. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
  10. 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 417
  11. 2023Analyzing Leakage of Personally Identifiable Information in Language Modelscited by 278
  12. 2022Do Users Write More Insecure Code with AI Assistants?cited by 186
12 more
  1. 2023Can Sensitive Information Be Deleted From LLMs? Objectives for Defending Against Extraction Attackscited by 156
  2. 2022Lost at C: A User Study on the Security Implications of Large Language Model Code Assistantscited by 87
  3. 2023How Secure is Code Generated by ChatGPT?cited by 77
  4. 2022TEMPERA: Test-Time Prompting via Reinforcement Learningcited by 50
  5. 2023Exploring the Potential of ChatGPT in Automated Code Refinement: An Empirical Studycited by 44
  6. 2023RePrompt: Automatic Prompt Editing to Refine AI-Generative Art Towards Precise Expressionscited by 43
  7. 2024PRewrite: Prompt Rewriting with Reinforcement Learningcited by 43
  8. 2021CoProtector: Protect Open-Source Code against Unauthorized Training Usage with Data Poisoningcited by 39
  9. 2022Automatic Code Documentation Generation Using GPT-3cited by 37
  10. 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
  11. 2023Analysis of ChatGPT on Source Codecited by 12
  12. 2023Using ChatGPT as a Static Application Security Testing Toolcited by 8

Built on by

Cited by year

Citing papers per year: 2024: 1; 2025: 2.

3 papers.