secret-handling

Prohibit agents from reading or writing secret environment files.

413|64|Updated Feb 7, 2023
One-click install
npx skills add https://github.com/christianhelle/refitter --skill secret-handling-christianhelle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secret-handling
Source: https://github.com/christianhelle/refitter/tree/main/.copilot/skills/secret-handling
Command: npx skills add https://github.com/christianhelle/refitter --skill secret-handling-christianhelle

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Spawned agents have read access to the entire repository, including .env files containing live credentials. If an agent reads secrets and writes them to .squad/ files (decisions, logs, history), Scribe auto-commits them to git, exposing them in remote history. This skill codifies absolute prohibitions and safe alternatives.

Core Features & Use Cases

  • Prohibits reading sensitive environment files: .env, .env.local, .env.production, .env.development, .env.staging, .env.test, and any .env.* unless explicitly allowed.
  • Provides safe alternatives: .env.example, .env.sample, .env.template.
  • Guidance for handling config data: ask the user directly for config details, consult .env.example for structure, and refer to documentation.

Quick Start

Ask the user directly for config details and consult .env.example for structure instead of reading live secrets.

Frequently Asked Questions about secret-handling

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

FAQPage Schema
How do I stop AI agents from reading .env files and leaking credentials into git history?

Prevent credential leakage by applying a security policy that bans agents from reading sensitive .env files and writing their contents into repository outputs. This avoids accidental exposure of live secrets in git history.

What is the best way to handle environment configuration without exposing live secrets to autonomous agents?

The best way to handle environment configuration safely is to ask the user directly for details and consult .env.example files for structure, rather than reading live secret files.

How does blocking sensitive file reads prevent leaked credentials in repository outputs?

Blocking sensitive file reads prevents leaked credentials by stopping agents from accessing .env files. Since agents cannot read the secrets, they cannot write them into logs, decisions, or history files that get auto-committed to remote repositories.

Are .env.example and .env.template files safe for agents to read when generating code?

Yes, .env.example, .env.sample, and .env.template files are safe alternatives. Agents can read these files to understand configuration structure without accessing live credentials.

When should I use secret-handling policies for agents operating in my repositories?

You should use secret-handling policies whenever spawned agents have read access to a repository containing .env files. This prevents them from reading live credentials and auto-committing them to remote git history.