secrets-gitleaks

Scan repositories and CI/CD pipelines for hardcoded secrets using Gitleaks.

183|35|Updated Nov 19, 2025
One-click install
npx skills add https://github.com/AgentSecOps/SecOpsAgentKit --skill secrets-gitleaks-agentsecops
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secrets-gitleaks
Source: https://github.com/AgentSecOps/SecOpsAgentKit/tree/main/skills/devsecops/secrets-gitleaks
Command: npx skills add https://github.com/AgentSecOps/SecOpsAgentKit --skill secrets-gitleaks-agentsecops

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gitleaks, git, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Hardcoded secret detection and prevention in git repositories and codebases using Gitleaks, enabling teams to identify passwords, API keys, tokens, and credentials with regex-based patterns and entropy analysis.

Core Features & Use Cases

  • Secret detection across repositories, CI/CD pipelines, and pre-commit workflows
  • Remediation guidance including credential rotation and git history cleanup
  • Compliance-oriented mappings and templated configurations to streamline audits (OWASP, CWE, PCI-DSS, SOC2, GDPR)

Quick Start

Scan a repository to identify exposed secrets and trigger an initial remediation plan.

Frequently Asked Questions about secrets-gitleaks

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

FAQPage Schema
How do I detect hardcoded secrets and API keys in my git repositories?

Detect hardcoded secrets in git repositories by scanning codebases with Gitleaks, which uses regex-based patterns and entropy analysis to identify exposed passwords, API keys, tokens, and credentials across your entire codebase.

Can I integrate secret scanning into CI/CD pipelines and pre-commit hooks?

Yes, you can integrate secret scanning into CI/CD pipelines and pre-commit workflows to automatically catch hardcoded credentials before they are committed, preventing sensitive data from reaching shared repositories.

How do I remediate exposed credentials and clean up git history after finding secrets?

Remediate exposed credentials by following provided remediation guidance for credential rotation and git history cleanup, ensuring that previously hardcoded secrets are invalidated and removed from the repository commit trail.

Does secret detection with Gitleaks support compliance requirements like OWASP and SOC2?

Yes, secret detection with Gitleaks supports compliance requirements by providing compliance-oriented mappings and templated configurations for OWASP, CWE, PCI-DSS, SOC2, and GDPR to streamline audit reporting and demonstrate credential protection.

What's the best way to track baseline secrets and prevent false positives during codebase scanning?

Track baseline secrets during codebase scanning by using baseline tracking features to acknowledge previously detected credentials, preventing recurring false positives while focusing new secret detection alerts on newly introduced vulnerabilities.