security-audit

Automate security audits of code repositories using Gitleaks and Trufflehog.

Updated Dec 20, 2025
One-click install
npx skills add https://github.com/Brennan-Wilkerson/second-brain-public --skill security-audit-brennan-wilkerson
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-audit
Source: https://github.com/Brennan-Wilkerson/second-brain-public/tree/main/.claude/skills/security-audit
Command: npx skills add https://github.com/Brennan-Wilkerson/second-brain-public --skill security-audit-brennan-wilkerson

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides automated security auditing to prevent credential leaks and ensure safe public repository workflows. It orchestrates multiple tools (Gitleaks, Trufflehog) and guides credential rotation and safe syncing to public repos.

Core Features & Use Cases

  • Pre-Commit Scan: Scan staged files for secrets before committing.
  • Pre-Push Scan: Scan push range before pushing to remote.
  • Full Security Audit: Comprehensive history scan, .gitignore coverage, and history checks.
  • Credential Rotation: Step-by-step rotation guidance after leaks or incidents.
  • Safe Public Sync: Audited sync to public repositories with explicit approvals.

Quick Start

Run:

  • /security-audit pre-commit
  • /security-audit pre-push
  • /security-audit full
  • /security-audit rotate
  • /security-audit sync-public

Frequently Asked Questions about security-audit

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

FAQPage Schema
How do I prevent secrets from being committed to my repository?

Pre-commit scanning detects credentials, API keys, and sensitive data in staged files before they're committed. This Skill automates pre-commit hooks using Gitleaks and Trufflehog to block commits containing secrets, stopping leaks at the source.

Can I scan my entire git history for leaked credentials?

Yes. Full security audits comprehensively scan your repository history, check .gitignore coverage, and identify credentials that may have been committed previously. This reveals past leaks so you can rotate compromised secrets.

What's the best way to set up automated security checks before pushing code?

Pre-push scanning runs security audits on the range of commits about to be pushed, catching secrets before they reach remote repositories. This Skill orchestrates Gitleaks and Trufflehog with git hooks to enforce audited, secure pushes automatically.

How do I safely sync a repository to public without exposing secrets?

Safe public sync audits your repository for credentials, rotates any found secrets, and requires explicit approval before pushing to public. This ensures no sensitive data is exposed when making a repository public.

What steps should I follow after discovering a credential leak?

Credential rotation guidance walks you through revoke-and-replace workflows after leaks or incidents. The Skill provides structured steps to invalidate compromised secrets and deploy fresh credentials safely.