secret-handling

Prohibits agents from reading live .env files, directing them to .env.example instead.

7|Updated Oct 24, 2020
One-click install
npx skills add https://github.com/snow-jallen/HomeSpeaker --skill secret-handling-snow-jallen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secret-handling
Source: https://github.com/snow-jallen/HomeSpeaker/tree/main/.copilot/skills/secret-handling
Command: npx skills add https://github.com/snow-jallen/HomeSpeaker --skill secret-handling-snow-jallen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Spawned agents have read access to the entire repository, including live credentials in .env files. This Skill codifies absolute prohibitions and safe alternatives to prevent credentials from being exposed or committed.

Core Features & Use Cases

  • Prohibits reading sensitive files (like .env, .env.local, .env.production, .env.development, .env.staging, .env.test) by agents.
  • Encourages safe alternatives (.env.example, .env.sample, .env.template) to inspect schema without exposing secrets.
  • Provides guidance for obtaining configuration details through prompts or documented sources.
  • Use Case: In a CI/CD environment, ensure secrets are not leaked through automated decisions and logs.

Quick Start

Ask for credentials directly or read .env.example to understand the required structure.

Frequently Asked Questions about secret-handling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent environment secrets in .env files from being leaked by code agents?

To prevent environment secrets from being leaked, you must prohibit code agents from reading live .env files entirely. This approach enforces safe alternatives, ensuring credentials are never exposed or committed during automated repository operations.

What is the safe alternative to reading live environment variables for configuration schema?

The safe alternative to reading live environment variables is inspecting .env.example, .env.sample, or .env.template files. These files provide the required configuration schema without exposing actual secret values to code agents.

How do I manage credential leakage risks in a CI/CD environment with automated agents?

Managing credential leakage risks in a CI/CD environment requires enforcing security policies that block agents from reading sensitive files. This ensures secrets are not leaked through automated decisions, logs, or code generation workflows.

Can I use documentation instead of .env files to understand required environment variables?

Yes, you can use documentation and prompt-based queries to understand required environment variables. This method enforces safe credential management by prescribing documented sources over accessing live secret files.

Does this approach apply to all variations of environment files like .env.local and .env.production?

Yes, this approach applies to all variations of environment files including .env.local, .env.production, .env.development, .env.staging, and .env.test. It implements explicit prohibitions on reading any sensitive environment file.

Why should spawned agents not read live repository credentials?

Spawned agents should not read live repository credentials because they have broad read access, which risks exposing sensitive data. Prohibiting access to .env files and enforcing policy alternatives prevents credential leakage.