secrets-guardian

Configure multi-layer secret protection for Git repositories using pre-commit hooks and GitHub Actions.

6|Updated Dec 7, 2025
One-click install
npx skills add https://github.com/timequity/plugins --skill secrets-guardian
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secrets-guardian
Source: https://github.com/timequity/plugins/tree/main/craft-coder/secrets-guardian
Command: npx skills add https://github.com/timequity/plugins --skill secrets-guardian

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

Protect repositories from accidental secret commits and guide setup of secret protection in CI/CD.

Core Features & Use Cases

  • Pre-commit hooks: gitleaks, detect-secrets
  • Baseline & CI: Baseline, GitHub Actions workflow
  • CI/CD Coverage: Optional workflows and tooling

Quick Start

Initialize multi-layer secret protection in a new project.

Frequently Asked Questions about secrets-guardian

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

FAQPage Schema
How do I prevent accidental secret commits to my Git repository?

Prevent accidental secret commits by implementing multi-layer protection: pre-commit hooks with gitleaks and detect-secrets scan for secrets before they're committed, a baseline file tracks known secrets, and .gitignore patterns block sensitive files. This catches leaks at the source before they reach the repository.

What's the best way to set up secret scanning in a new project?

Initialize secrets-guardian during project setup to configure pre-commit hooks, generate a .secrets.baseline file, and establish .gitignore patterns. Optional GitHub Actions workflows provide continuous CI/CD scanning across all commits to enforce secret protection automatically.

How do gitleaks and detect-secrets work together for security?

Gitleaks and detect-secrets are complementary pre-commit tools: gitleaks identifies patterns matching known secret formats, while detect-secrets builds a baseline of allowed secrets. Running both layers catches different secret types and reduces false positives through baseline comparison.

Can I integrate secret protection into my GitHub Actions workflow?

Yes, secrets-guardian includes optional GitHub Actions workflow templates that automate secret scanning in CI/CD pipelines. This ensures every commit and pull request is checked for leaked secrets before merging, extending protection beyond local pre-commit hooks.

What do I do if a secret has already been committed to the repository?

Use secrets-guardian's remediation guidance to remove leaked secrets from Git history, then establish baseline scanning to prevent recurrence. Baseline files and CI/CD integration catch any future secret commits automatically.