validate-secrets

Detect unencrypted secret files in staged Git changes and block commits.

Updated Dec 26, 2025
One-click install
npx skills add https://github.com/piotrb/iamra-injector --skill validate-secrets
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: validate-secrets
Source: https://github.com/piotrb/iamra-injector/tree/main/.claude/skills/validate-secrets
Command: npx skills add https://github.com/piotrb/iamra-injector --skill validate-secrets

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents leakage of sensitive secrets by enforcing SOPS encryption before commits. It scans staged/modified files against common secret patterns and verifies encryption metadata.

Core Features & Use Cases

  • Pattern-based detection: identifies secret files by naming conventions such as *.sops.yaml, sopssecret.yaml, /secrets/.yaml, and secret.yaml.
  • Encryption verification: detects whether a file contains sops: metadata indicating encryption.
  • Commit governance: reports unencrypted secrets and guides the user to encrypt manually, avoiding automatic changes.
  • Workflow integration: hooks into the commit workflow to block unencrypted changes.

Quick Start

Run the validate-secrets skill to scan the current Git staging area and report any unencrypted secret files that require encryption.

Frequently Asked Questions about validate-secrets

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

FAQPage Schema
How do I prevent accidentally committing unencrypted secrets to Git?▼

Prevent unencrypted secret commits by scanning staged files for secret patterns and verifying SOPS encryption metadata before each commit. This Skill identifies files like *.sops.yaml, *secret*.yaml, and */secrets/*.yaml in your staging area and blocks commits containing unencrypted secrets, requiring manual encryption first.

What secret file patterns does Git secret validation detect?▼

Secret validation detects files matching common naming conventions: *.sops.yaml, *sopssecret*.yaml, */secrets/*.yaml, and *secret*.yaml. The Skill scans these patterns in staged and modified changes to identify secrets requiring encryption before commit.

How does SOPS encryption verification work in a Git commit workflow?▼

SOPS verification checks whether staged secret files contain sops: metadata indicating encryption. If unencrypted secrets are detected, the commit is blocked with detailed file listings and explicit instructions to encrypt manually using SOPS, preventing secret leakage.

Can I use secret validation with my existing Git hooks?▼

Yes, this Skill integrates into your Git commit workflow as a pre-commit hook, scanning the staging area for unencrypted secrets and blocking commits that fail verification. It works alongside existing hooks without automatic file modification.

What happens when validate-secrets finds an unencrypted secret file?▼

When unencrypted secrets are found, the Skill reports a BLOCKED outcome with detailed file listings and guides you to encrypt files manually before retry. The commit is prevented, protecting sensitive data from accidental exposure.