secret-handling

Block commits containing secret patterns using Scribe pre-commit validation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill enforces a zero-tolerance policy for reading and writing sensitive secrets in code repositories, ensuring that sensitive information remains secure and is not accidentally exposed.

Core Features & Use Cases

  • Secret Scanning: Prohibit reading of any .env files or other known secret files to avoid credential leaks.
  • Secure Outputs: Restrict writing secrets to .squad/ files, which are auto-committed by Scribe.
  • Pre-commit Validation: Use Scribe to scan all staged files for secret patterns and block commits if any are found.
  • Remediation Guidelines: Provide steps to fix commits that have already leaked secrets, including revoking credentials and removing sensitive information from git history.

Quick Start

Before committing changes, run 'scribe pre-commit-check' to validate and block commits containing secrets.

Frequently Asked Questions about secret-handling

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

FAQPage Schema
How do I prevent secret leaks in my code repository before committing?

To prevent secret leaks before committing, run 'scribe pre-commit-check' to scan staged files. This validation tool uses regex patterns to detect sensitive data and blocks commits if any secret patterns are found.

What is the best way to stop .env files or credentials from being committed to git?

Stopping .env files and credentials from being committed requires enforcing strict read policies that prohibit reading known secret files. This prevents accidental credential exposure by blocking access to sensitive information.

How do I remediate a commit that has already leaked secrets into git history?

Remediating leaked secrets in git history involves following provided remediation guidelines to remove sensitive information and revoke compromised credentials. This ensures the exposed credentials are invalidated and the repository is secured.

Can I write sensitive data to specific files without triggering secret detection blocks?

You can write sensitive data to '.squad/' files without triggering blocks. These files are auto-committed by Scribe and are exempt from the strict write policies applied to standard code repository files.

Does pre-commit validation work without installing additional dependencies?

Pre-commit validation works without external dependencies by using Scribe and regex patterns to scan staged files. It operates independently to detect sensitive data and enforce zero-tolerance security policies.

Related Skills