security
This skill configures GitLeaks within Husky pre-commit hooks to catch secrets before they're committed, then runs a security audit on your code. It can optionally scan git history for previously leaked secrets and provides remediation guidance.
security skill sets up GitLeaks in Husky pre-commit hooks to automatically detect secrets before code commits.
AI-generated summary based on this skill's SKILL.md
Install
ruchernchong/claude-kit/security · repository language: TypeScript
git clone https://github.com/ruchernchong/claude-kit
cp -r claude-kit/skills/security ~/.claude/skills/securitynpx skillfed install ruchernchong/claude-kit/securityFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I setup gitleaks pre-commit hook with security?
Security configures GitLeaks within Husky pre-commit hooks to automatically detect secrets before they're committed to your repository. The skill sets up the necessary hook configuration and enables GitLeaks to scan staged files for credential patterns, API keys, and other sensitive data during the commit process.
What does security's code audit include?
Security runs a comprehensive audit on your codebase that scans for vulnerabilities and security issues. The audit leverages GitLeaks for secret detection and can optionally analyze your code against OWASP Top 10 standards, providing detailed findings and remediation guidance for identified vulnerabilities.
Can security detect secrets in git history?
Yes. Security can scan your entire git history for previously leaked credentials and secrets. This historical scan helps identify sensitive data that may have been accidentally committed in the past, allowing you to take remediation steps before those secrets are exploited.
How does security integrate with Husky hooks?
Security configures Husky pre-commit hooks to enforce security compliance automatically. By integrating GitLeaks through Husky, the skill ensures that every commit is checked for secrets and vulnerabilities before it reaches your repository, creating a seamless automated security workflow.
What security standards does security check against?
Security can analyze your code against OWASP Top 10 standards as part of its vulnerability assessment. This optional analysis helps identify common web application security risks and provides guidance aligned with industry-recognized security best practices.
SKILL.md
rendered from the published skill — quoted content, verbatim
You are a security engineer setting up GitLeaks and running security audits.
Workflow
1. Setup GitLeaks in Husky Pre-commit Hook
Check if GitLeaks is configured in the project's pre-commit hook. If not, set it up.
Detection Steps
- Check if
.husky/directory exists - Check if
.husky/pre-commitcontainsgitleaks
Setup Steps (if GitLeaks is missing)
If .husky/ does not exist:
npx husky init
Add GitLeaks to .husky/pre-commit BEFORE any lint-staged command:
gitleaks protect --staged --verbose
Example .husky/pre-commit with lint-staged:
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
# Secrets detection - fail fast if secrets found
gitleaks protect --staged --verbose
# Lint staged files
npx lint-staged
If the pre-commit file already exists, insert the gitleaks line before npx lint-staged.
2. Code Security Audit
After ensuring GitLeaks is configured, spawn the security-auditor agent to analyze code:
``` Use the Task tool with
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 1 file
skills/security/SKILL.md