secret-handling

Prevents agent reads/exports of sensitive .env files and credentials in logs or commits.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/WayneWalterBerry/MMO --skill secret-handling-waynewalterberry
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secret-handling
Source: https://github.com/WayneWalterBerry/MMO/tree/main/.copilot/skills/secret-handling
Command: npx skills add https://github.com/WayneWalterBerry/MMO --skill secret-handling-waynewalterberry

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This policy prevents agents from reading sensitive environment files and prevents secrets from being written to .squad/ commit history or logs.

Core Features & Use Cases

  • Prohibits reading secret files such as .env, .env.local, and other .env.* variants, ensuring no live credentials are exposed.
  • Recommends safe alternatives like reading from .env.example, .env.template, or consulting documentation for schema without exposing secrets.
  • Enforces pre-commit validation, redaction, and prompts to obtain credentials only when explicitly required, reducing risk of credential leakage.
  • Provides remediation guidance and safe prompts for config access in team workflows.

Quick Start

Ask for credentials only when necessary and reference the .env.example file for structure before attempting secret access.

Frequently Asked Questions about secret-handling

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

FAQPage Schema
How do I prevent secrets in .env files from leaking into git commit history?

Use pre-commit secret-management policies to block agents from reading .env files and writing credentials to git commit history. This prevents sensitive environment variables from being exposed in version control logs.

What is the best way to redact sensitive data from environment files during automated commits?

Data redaction during automated commits is best handled by enforcing prohibitions on direct secret reads and prompting for credentials only when explicitly required. This approach prevents live credentials from entering repository logs or commit history.

Can I use .env.example files to safely reference config schema without exposing live secrets?

Yes, you can safely read .env.example or .env.template files to understand config schema without exposing live secrets. This security policy recommends these safe alternatives over directly accessing sensitive environment files.

Does this secret-management policy apply to automated reads and generated decisions across development teams?

Yes, this secret-management policy applies to all repository interactions including automated reads, commits, logs, and generated decisions across development teams. It enforces prohibitions on direct secret reads and requires safe alternatives before config details are accessed.

Why do I need a security policy to stop agents from reading sensitive environment files?

You need a security policy because automated agents can inadvertently read .env files and expose secrets by writing them to commit history or logs. Enforcing prohibitions on direct secret reads ensures no live credentials are leaked during development workflows.

How do I configure pre-commit hooks to enforce data redaction for environment variables?

Configure pre-commit hooks by enforcing validation, redaction, and user prompts before config details are accessed. This ensures credentials are only requested when explicitly required and are scrubbed from generated logs and commit history.