module

Autobot::Config::Env

.env file detection and protection utilities

Constants

FILE_PATTERN = /\.env(?:\.|$)/

Pattern for detecting .env files Matches: .env, .env.local, .env.production, secrets.env, etc.

Class methods

command_references_file?(command : String) : Bool

Check if a command string references .env files

Source
file?(path : Path | String) : Bool

Check if a path points to an .env file (always blocked for security)

This checks for various .env file naming patterns:

  • .env
  • .env.local, .env.production, .env.development
  • config.env, secrets.env, etc.
Source