Protecting confidential data when using AI coding assistants: A practical guide
Abstract
Generative artificial intelligence (AI) coding assistants can substantially accelerate research workflows in ecology, fisheries science, and related quantitative disciplines, but they also create new pathways for accidental or adversarial disclosure of confidential information. Researchers in these fields routinely work with legally protected and commercially sensitive records (e.g., individual-level records, accurate geographic locations, pre-release data), and even small snippets of code context, console output, comments, or file paths can be disclosive when transmitted to cloud-hosted large language model (LLM) services. This paper provides a practical guide for researchers and institutions to use LLM-based coding assistants while maintaining confidentiality. We (i) catalogue common AI integration points in widely used development environments and R tooling, highlighting features that may activate or transmit context without obvious user intent; (ii) summarise key data exposure pathways – intentional sharing, accidental transmission, and adversarial exploitation such as prompt injection; (iii) propose a four-scenario framework spanning browser chat, editor autocomplete, agentic assistants, and local models, with increasing capability and risk; and (iv) offer actionable mitigations centered on a “develop on simulated data, run on real data” workflow and a complementary two-computer separation strategy. We also introduce the confideR R package, which supports session…
Read the paper
Related studies
- Regulation of nucleolus assembly by non-coding RNA polymerase II transcripts
- For a Healthy Histone Code, a Little SUMO in the Tail Keeps the Acetyl Away
- Discovering a binary CTCF code with a little help from BORIS
- Article Commentary: Stabilizing the Code–-Methods to Preserve RNA Prove Their Worth
- Foreword to the Special Issue for the RINTC (The Implicit Seismic Risk of Code-Conforming Structures) Project
- Commentary: Promoting Health and Well-being in Pediatric Primary Care Settings: Using Health and Behavior Codes at Routine Well-child Visits
Go deeper in Evidence Hub
Evidence Hub adds a study data sheet (design, sample size, evidence level, key numbers), an AI summary and a chat grounded in the paper's text.