Do not give away my secrets: Uncovering the privacy issue of neural code completion tools

Y Huang, Y Li, W Wu, J Zhang, MR Lyu - arXiv preprint arXiv:2309.07639, 2023 - arxiv.org
arXiv preprint arXiv:2309.07639, 2023arxiv.org
Neural Code Completion Tools (NCCTs) have reshaped the field of software development,
which accurately suggest contextually-relevant code snippets benefiting from language
modeling techniques. However, language models may emit the training data verbatim
during inference with appropriate prompts. This memorization property raises privacy
concerns of commercial NCCTs about the hard-coded credential leakage, leading to
unauthorized access to systems. Therefore, to answer whether NCCTs will inadvertently …
Neural Code Completion Tools (NCCTs) have reshaped the field of software development, which accurately suggest contextually-relevant code snippets benefiting from language modeling techniques. However, language models may emit the training data verbatim during inference with appropriate prompts. This memorization property raises privacy concerns of commercial NCCTs about the hard-coded credential leakage, leading to unauthorized access to systems. Therefore, to answer whether NCCTs will inadvertently emit the hard-coded credential, we propose an evaluation tool called Hard-coded Credential Revealer (HCR). HCR effectively constructs test prompts from GitHub code files with credentials to trigger memorization phenomenon of commercial NCCTs. Then, HCR extracts credentials with pre-defined format from the responses by four designed filters. We apply HCR to evaluate two representative commercial NCCTs: GitHub Copilot and Amazon CodeWhisperer and successfully extracted 2,702 hard-coded credentials from Copilot and 129 secrets from CodeWhisper under the black-box setting, among which at least 3.6% and 5.4% secrets are real strings from GitHub repositories. Moreover, two operational credentials were identified. The experimental results raise the severe privacy concern of the potential leakage of hard-coded credentials in the training data of commercial NCCTs.
arxiv.org
以上显示的是最相近的搜索结果。 查看全部搜索结果