Author SHA1 Message Date
Russell Shean f4684bdca7 Merge a614252a10 into 5763345204 2026-04-25 10:00:10 +09:00
Russell Shean a614252a10 Merge pull request #1 from Russell-Shean/Russell-Shean-patch-1
R: add `.env` to prevent accidentally exposing credentials
2025-12-19 19:30:56 +08:00
Russell Shean 460b9d97a7 R: add .env to prevent accidentally exposing credentials
Historically R users have used the .Renviron file for storing environmental variables such as secrets, credentials, API keys etc. However, I believe there are several compelling reasons for adding .env to the .gitignore too:

1. The dotenv R package was created to allow users to use .env instead of .Renviron. The package has a significant number of downloads.  https://github.com/gaborcsardi/dotenv 

2. .env files are standard in many other programming languages. It wouldn't be that out of the unexpected to think R users might end up with an .env file because a python user on their team contributed files to the repo, the R user started programming in nodejs and is used to working with .env file, or a repo is in the process of being translated from a language that uses .env to R. 

3. LLMs are making programming accessible to people who may not have much previous experience handling credentials and security. One of the first steps many of these users have to do is store LLM provider API keys somewhere. I worry about a new R user adapting a python workflow or an R workflow that recommends using an .env file and then accidentally committing their LLM API keys to a public repo. 

4. I can't think of why an R user would create an .env file for any other reason other than storing credentials and environmental variables. If, for whatever reason, they need to commit an .env file, they can remove that part from the template, but I think the risk of accidentally exposing sensitive credentials justifies adding .env files to the template and not commenting it out by default.
2025-12-19 19:27:15 +08:00
11 changed files with 2 additions and 184 deletions

No files matched your search

+1
View File
@@ -23,6 +23,7 @@
*.dll
*.so.*
# Fortran module files
*.mod
*.smod
-68
View File
@@ -1,68 +0,0 @@
# AI agents and assistants
#
# Some common agent instruction and project configuration files are listed
# below as commented-out examples. They are often intentionally committed and
# shared with a team, so only uncomment them if they are local-only in your
# project.
# GEMINI.md
# WARP.md
# CRUSH.md
# QWEN.md
# OpenAI Codex
# AGENTS.md
# .codex/
# Aider
.aider.input.history
.aider.chat.history.md
.aider.llm.history
.aider.tags.cache.v*
# .aiderignore
# Claude Code
.claude/*.local.json
.claude/**/*.log
CLAUDE.local.md
# .claude/
# Gemini CLI
gemini-debug.log
.gemini-clipboard/
# .gemini/
# Cursor AI
# .cursorrules
# .cursor/
# .cursor.json
# .cursor-settings.yaml
# Continue
# .continue/
# .continuerc.json
# Cline
# .cline/
# .clinerules
# cline.json
# Other agent/editor project config
# .warp/
# .crush/
# .codeium/
# .deepseek/
# .amazon-codewhisperer/
# .tabnineignore
# .tabnine/
# GitHub Copilot
# .github/copilot-instructions.md
# Windsurf Editor
# .windsurfrules
# .windsurf/
# Replit AI Development
# .replit
# replit.nix
-1
View File
@@ -4,7 +4,6 @@
*.autosave
*.slx.r*
*.mdl.r*
*.bak
# Derived content-obscured files
*.p
-3
View File
@@ -1,6 +1,3 @@
# Godot 4.2+ specific ignores
~*.dll
# Godot 4+ specific ignores
.godot/
.nomedia
-4
View File
@@ -4,7 +4,6 @@
# Files generated by invoking Julia with --track-allocation
*.jl.mem
*.jl.*.mem
# System-specific files and directories generated by the BinaryProvider and BinDeps packages
# They contain absolute paths specific to the host computer, and so should not be committed
@@ -27,6 +26,3 @@ Manifest*.toml
# File generated by the Preferences package to store local preferences
LocalPreferences.toml
JuliaLocalPreferences.toml
# Conda environment and metadata created in the project directory by the CondaPkg package
.CondaPkg/
-1
View File
@@ -21,7 +21,6 @@ Homestead.yaml
Homestead.json
/.vagrant
.phpunit.result.cache
/.phpunit.cache
/public/build
/storage/pail
-47
View File
@@ -1,47 +0,0 @@
## LASAL ###
# website: https://www.sigmatek-automation.com/en/products/engineering-tool-lasal/
# lasal screen/visu runtime folders generated during build
**/Runtime
**/BAK
**/Language
**/TempPreview
# lasal class runtime folders generated during build
ProjectInternal
Internal
**/Network/*/*.st
**/Drive/*.st
# bootdisk files
**/Bootdisk
# various filetypes generated at runtime or used for internal backups
*.ldi
*.bak
*.lob
*.lba
*.lcb
*.lock
*.plc
*.7z
*.zip
*.lcc
*.lds
# tag files generated by the compiler
*.mme
**/MaeExp.txt
**/MaeExp.xml
# SigCLib requires lba and lob files
!cObjLib.lob
!cObjLib.lba
# opc related classes added automatically from lasal instance
!**/Class/OPC_UA/**
!**/Class/OPC_UA_Client/**
!**/Class/OPC_UA_Server/**
!**/Class/OPC_UA_ModuleBase/**
!**/Class/OPC_UA_AddressSpace/**
!**/Class/OPC_UA_OpenSSL_v1_1_1/**
-53
View File
@@ -1,53 +0,0 @@
# Build System Artifacts
# MoonBit default build output directory.
_build/
# Local MoonBit package cache directory.
.mooncakes/
# Coverage and Test Artifacts
# Coverage reports generated by MoonBit tooling.
moonbit-coverage-*.txt
# Coverage output directory used by coverage commands.
_coverage/
# Bisect runtime coverage data file.
bisect.coverage
# JavaScript Target Artifacts
# Uncomment if generated JavaScript should be ignored.
# *.js
# Source map files generated for JavaScript output.
*.js.map
# Node.js dependencies used in JS target workflows.
node_modules/
# WebAssembly Target Artifacts
# Compiled WebAssembly binaries.
*.wasm
# WebAssembly text format output.
*.wat
# MoonBit Pilot / Agent Artifacts
# MoonBit agent runtime state and temporary files.
.moonagent/
# LLVM Backend Artifacts
# LLVM textual intermediate representation (IR) files.
*.ll
# LLVM bitcode files.
*.bc
# Native object files from LLVM/native compilation.
*.o
# Generated assembly source files.
*.s
# Default executable output name on Unix-like systems.
*.out
# Native executable output on Windows.
*.exe
# macOS debug symbol bundles.
*.dSYM/
+1
View File
@@ -38,6 +38,7 @@ vignettes/*.pdf
# R Environment Variables
.Renviron
.env
# pkgdown site
docs/
-2
View File
@@ -131,5 +131,3 @@ by automatically forking the project and prompting to send a pull request too.
[CC0-1.0](./LICENSE).
## Test
This is just a test
-5
View File
@@ -1,5 +0,0 @@
# FreeCAD backup and temporary files
*.FC.lock
*.bak
*.FCBak
*.tmp