secret-handling

Codify prohibitions on reading and leaking credentials from repository secret files.

9|1|Updated Jul 21, 2025
One-click install
npx skills add https://github.com/usepowershell/PoshMcp --skill secret-handling-usepowershell
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secret-handling
Source: https://github.com/usepowershell/PoshMcp/tree/main/.copilot/skills/secret-handling
Command: npx skills add https://github.com/usepowershell/PoshMcp --skill secret-handling-usepowershell

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Spawned agents have read access to the repository, including .env files containing live credentials. This skill codifies absolute prohibitions and safe alternatives to prevent credential leakage.

Core Features & Use Cases

  • Prohibits reading sensitive files like .env (and variants) and prohibits writing secrets to .squad/ committed files.
  • Recommends safe alternatives (e.g., .env.example, .env.sample) and user prompts for credentials when needed.
  • Provides guardrails for Scribe pre-commit validation to scan for secrets and block risky commits.

Quick Start

Configure the system to block reading live .env files and rely on .env.example for configuration schemas.

Frequently Asked Questions about secret-handling

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

FAQPage Schema
How do I prevent code agents from reading .env files and leaking credentials?

Prevent secret exposure by enforcing rules that prohibit code agents from reading .env files and writing secrets to committed files. This skill blocks access to live credentials and provides safe alternatives like .env.example for configuration schemas.

What is the best way to enforce secret handling policies in a git commit workflow?

Enforce secret handling by applying pre-commit validation guardrails that scan staged changes for secrets and block risky commits. This codifies prohibitions on reading sensitive files and prevents credentials from leaking into the repository history.

Can I use .env.example files as a safe alternative to committing real credentials?

Yes, .env.example and .env.sample files serve as safe alternatives to store configuration schemas without exposing live credentials. This approach enforces secure credential handling by prompting users for secrets when needed instead of reading .env files.

Why does my security policy need to block reading live .env files?

Your security policy needs to block reading live .env files because spawned agents have read access to the repository, including files containing live credentials. Codifying these prohibitions prevents accidental credential leakage and enforces safe handling practices.

Does pre-commit validation work with .env files to block secrets from being committed?

Yes, pre-commit validation works by scanning staged changes for secrets and blocking risky commits before they enter the repository. This guardrail enforces rules against writing secrets to committed files and prevents accidental credential exposure.

What are the limitations of relying on .env.example for secure credential handling?

The limitation of relying on .env.example is that it only provides a configuration schema without live credentials, requiring users to be prompted for secrets when needed. You must still enforce pre-commit validations to block any actual secrets from being committed.