[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B7RZATAWX5N3KC933Q970D":3,"skill-same:01M7B7RZATAWX5N3KC933Q970D":100},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":13,"repositoryHtmlUrl":49,"repositoryHomepageUrl":6,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":51,"install":52,"resources":65},"01M7B7RZATAWX5N3KC933Q970D","implementing-secret-scanning-with-gitleaks",null,"This skill covers implementing Gitleaks for detecting and preventing hardcoded secrets in git repositories. It addresses configuring pre-commit hooks, CI\u002FCD pipeline integration, custom rule authoring for organization-specific secrets, baseline management for existing repositories, and remediation workflows for exposed credentials.","vikasvardhanv\u002Fjerry_skills","vikasvardhanv","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99010657?v=4","01M7B2B0VN78W7529RQX5BR6DZ","01M7B2B0WDNTXJHRK3QNPNWRP6",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fimplementing-secret-scanning-with-gitleaks\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fimplementing-secret-scanning-with-gitleaks\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: implementing-secret-scanning-with-gitleaks\ndescription: 'This skill covers implementing Gitleaks for detecting and preventing\n  hardcoded secrets in git repositories. It addresses configuring pre-commit hooks,\n  CI\u002FCD pipeline integration, custom rule authoring for organization-specific secrets,\n  baseline management for existing repositories, and remediation workflows for exposed\n  credentials.\n\n  '\ndomain: cybersecurity\nsubdomain: devsecops\ntags:\n- devsecops\n- cicd\n- secret-scanning\n- gitleaks\n- pre-commit\n- secure-sdlc\nversion: 1.0.0\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.PS-01\n- GV.SC-07\n- ID.IM-04\n- PR.PS-04\nmitre_attack:\n- T1195\n- T1554\n- T1059.004\n- T1003\n- T1110\n---\n\n# Implementing Secret Scanning with Gitleaks\n\n## When to Use\n\n- When developers may accidentally commit API keys, passwords, tokens, or private keys to repositories\n- When establishing pre-commit gates that prevent secrets from entering the git history\n- When scanning existing repository history for previously committed secrets that need rotation\n- When compliance requirements mandate secret detection across all source code repositories\n- When migrating from manual secret audits to automated continuous scanning\n\n**Do not use** for detecting secrets in running applications or memory (use runtime secret detection), for managing secrets after detection (use Vault or AWS Secrets Manager), or for scanning container images (use Trivy or Grype).\n\n## Prerequisites\n\n- Gitleaks v8.18+ installed via binary, Go install, or Docker\n- Pre-commit framework installed for local hook integration\n- Git repository with history to scan\n- CI\u002FCD platform access (GitHub Actions, GitLab CI, or equivalent)\n\n## Workflow\n\n### Step 1: Install and Run Initial Repository Scan\n\nPerform a baseline scan of the repository to identify all existing secrets in the git history.\n\n```bash\n# Install Gitleaks\nbrew install gitleaks  # macOS\n# or download binary from https:\u002F\u002Fgithub.com\u002Fgitleaks\u002Fgitleaks\u002Freleases\n\n# Scan entire git history for secrets\ngitleaks detect --source . --report-format json --report-path gitleaks-report.json -v\n\n# Scan only staged changes (for pre-commit)\ngitleaks protect --staged --report-format json --report-path gitleaks-staged.json\n\n# Scan specific commit range\ngitleaks detect --source . --log-opts=\"HEAD~10..HEAD\" --report-format json\n\n# Scan without git history (filesystem only)\ngitleaks detect --source . --no-git --report-format json\n```\n\n### Step 2: Configure Pre-Commit Hook\n\nSet up Gitleaks as a pre-commit hook to prevent secrets from being committed.\n\n```yaml\n# .pre-commit-config.yaml\nrepos:\n  - repo: https:\u002F\u002Fgithub.com\u002Fgitleaks\u002Fgitleaks\n    rev: v8.21.2\n    hooks:\n      - id: gitleaks\n        name: gitleaks\n        description: Detect hardcoded secrets using Gitleaks\n        entry: gitleaks protect --staged --verbose --redact\n        language: golang\n        pass_filenames: false\n```\n\n```bash\n# Install pre-commit framework\npip install pre-commit\n\n# Install hooks defined in .pre-commit-config.yaml\npre-commit install\n\n# Run against all files (not just staged)\npre-commit run gitleaks --all-files\n\n# Test the hook with a deliberate secret\necho 'AWS_SECRET_ACCESS_KEY=\"wJalrXUtnFEMI\u002FK7MDENG\u002FbPxRfiCYEXAMPLEKEY\"' >> test.txt\ngit add test.txt\ngit commit -m \"test\"  # Should be blocked by gitleaks\n```\n\n### Step 3: Integrate into GitHub Actions\n\n```yaml\n# .github\u002Fworkflows\u002Fsecret-scanning.yml\nname: Secret Scanning\n\non:\n  push:\n    branches: [main, develop]\n  pull_request:\n    branches: [main]\n\njobs:\n  gitleaks:\n    name: Gitleaks Secret Scan\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n        with:\n          fetch-depth: 0  # Full history for comprehensive scanning\n\n      - name: Run Gitleaks\n        uses: gitleaks\u002Fgitleaks-action@v2\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}  # Required for gitleaks-action v2\n\n      # Alternative: Run Gitleaks directly\n      - name: Install Gitleaks\n        run: |\n          wget -q https:\u002F\u002Fgithub.com\u002Fgitleaks\u002Fgitleaks\u002Freleases\u002Fdownload\u002Fv8.21.2\u002Fgitleaks_8.21.2_linux_x64.tar.gz\n          tar -xzf gitleaks_8.21.2_linux_x64.tar.gz\n          chmod +x gitleaks\n\n      - name: Scan for secrets\n        run: |\n          if [ \"${{ github.event_name }}\" == \"pull_request\" ]; then\n            .\u002Fgitleaks detect \\\n              --source . \\\n              --log-opts=\"${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}\" \\\n              --report-format sarif \\\n              --report-path gitleaks.sarif \\\n              --exit-code 1\n          else\n            .\u002Fgitleaks detect \\\n              --source . \\\n              --report-format sarif \\\n              --report-path gitleaks.sarif \\\n              --exit-code 1 \\\n              --baseline-path .gitleaks-baseline.json\n          fi\n\n      - name: Upload SARIF\n        if: always()\n        uses: github\u002Fcodeql-action\u002Fupload-sarif@v3\n        with:\n          sarif_file: gitleaks.sarif\n          category: gitleaks\n```\n\n### Step 4: Author Custom Detection Rules\n\nCreate organization-specific rules for internal secret patterns.\n\n```toml\n# .gitleaks.toml\ntitle = \"Organization Gitleaks Configuration\"\n\n[extend]\nuseDefault = true  # Include all default rules\n\n# Custom rule for internal API tokens\n[[rules]]\nid = \"internal-api-token\"\ndescription = \"Internal API token for service-to-service auth\"\nregex = '''(?i)x-internal-token[\"\\s:=]+[\"\\']?([a-zA-Z0-9_\\-]{40,})[\"\\']?'''\nentropy = 3.5\nkeywords = [\"x-internal-token\"]\ntags = [\"internal\", \"api\"]\n\n[[rules]]\nid = \"database-connection-string\"\ndescription = \"Database connection string with embedded credentials\"\nregex = '''(?i)(postgres|mysql|mongodb|redis):\u002F\u002F[^:]+:[^@]+@[^\u002F]+\u002F\\w+'''\nkeywords = [\"postgres:\u002F\u002F\", \"mysql:\u002F\u002F\", \"mongodb:\u002F\u002F\", \"redis:\u002F\u002F\"]\ntags = [\"database\", \"credentials\"]\n\n[[rules]]\nid = \"jwt-secret\"\ndescription = \"JWT signing secret\"\nregex = '''(?i)(jwt[_-]?secret|jwt[_-]?key)[\"\\s:=]+[\"\\']?([a-zA-Z0-9\u002F+_\\-]{32,})[\"\\']?'''\nentropy = 3.0\nkeywords = [\"jwt_secret\", \"jwt-secret\", \"jwt_key\", \"jwt-key\"]\n\n# Allowlist for test files and known safe patterns\n[allowlist]\ndescription = \"Global allowlist\"\npaths = [\n  '''(^|\u002F)test(s)?\u002F''',\n  '''(^|\u002F)spec\u002F''',\n  '''\\.test\\.(js|ts|py)$''',\n  '''\\.spec\\.(js|ts|py)$''',\n  '''__mocks__\u002F''',\n  '''fixtures\u002F''',\n  '''(^|\u002F)vendor\u002F''',\n  '''node_modules\u002F'''\n]\nregexes = [\n  '''EXAMPLE''',\n  '''example\\.com''',\n  '''test[-_]?(key|secret|token|password)''',\n  '''(?i)placeholder''',\n  '''000000+'''\n]\n```\n\n### Step 5: Manage Baselines for Existing Repositories\n\nCreate a baseline of known findings to avoid blocking development while historical secrets are being rotated.\n\n```bash\n# Generate baseline from current state\ngitleaks detect --source . --report-format json --report-path .gitleaks-baseline.json\n\n# Subsequent scans compare against baseline (only new findings trigger failures)\ngitleaks detect --source . --baseline-path .gitleaks-baseline.json --exit-code 1\n\n# Review baseline periodically and remove entries as secrets are rotated\ncat .gitleaks-baseline.json | python3 -m json.tool | head -50\n```\n\n### Step 6: Remediate Exposed Secrets\n\nWhen a secret is detected, follow the rotation and history cleanup procedure.\n\n```bash\n# 1. Immediately rotate the exposed credential\n#    - Revoke the old API key\u002Ftoken in the service provider\n#    - Generate a new credential\n#    - Store the new credential in a secrets manager\n\n# 2. Remove secret from git history using git-filter-repo\npip install git-filter-repo\n\n# Create expressions file for secrets to remove\ncat > \u002Ftmp\u002Fexpressions.txt \u003C\u003C 'EOF'\nregex:AKIA[0-9A-Z]{16}==>REDACTED_AWS_KEY\nregex:(?i)password\\s*=\\s*\"[^\"]*\"==>password=\"REDACTED\"\nEOF\n\ngit filter-repo --replace-text \u002Ftmp\u002Fexpressions.txt --force\n\n# 3. Force-push the cleaned history (coordinate with team)\n# git push --force --all  # WARNING: Requires team coordination\n\n# 4. Add the secret pattern to .gitleaks.toml rules\n# 5. Update the baseline file to remove the resolved finding\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Secret | Any credential, token, key, or sensitive string that should not appear in source code |\n| Pre-commit Hook | Git hook that runs before a commit is created, blocking commits containing detected secrets |\n| Entropy | Measure of randomness in a string; high-entropy strings are more likely to be secrets |\n| Baseline | Snapshot of existing findings used to differentiate new secrets from pre-existing ones |\n| Allowlist | Configuration specifying paths, patterns, or commits to exclude from detection |\n| SARIF | Static Analysis Results Interchange Format for uploading findings to security dashboards |\n| git-filter-repo | Tool for rewriting git history to remove sensitive data from all commits |\n\n## Tools & Systems\n\n- **Gitleaks**: Open-source secret detection tool supporting pre-commit hooks, CI\u002FCD, and historical scanning\n- **pre-commit**: Framework for managing and maintaining multi-language pre-commit hooks\n- **git-filter-repo**: History rewriting tool for removing secrets from git history\n- **TruffleHog**: Alternative secret scanner with verified secret detection capabilities\n- **GitHub Secret Scanning**: Native GitHub feature that detects secrets matching partner patterns\n\n## Common Scenarios\n\n### Scenario: Onboarding Secret Scanning on a Legacy Repository\n\n**Context**: A 5-year-old repository has never been scanned. The team needs to enable secret scanning without blocking all development while historical secrets are rotated.\n\n**Approach**:\n1. Run `gitleaks detect` against full history and generate a baseline JSON file\n2. Triage each finding: classify as active (needs rotation), inactive (already rotated), or false positive\n3. Immediately rotate all active secrets and update consuming services\n4. Commit the baseline file (excluding active secrets that have been fixed)\n5. Enable pre-commit hooks for new development immediately\n6. Add CI\u002FCD scanning with the baseline to catch only new secrets\n7. Progressively reduce the baseline as historical secrets are rotated\n\n**Pitfalls**: Generating a baseline without triaging means accepting risk on unrotated secrets. Never assume a historical secret is inactive without verifying with the service provider. Running git-filter-repo on a shared repository without coordination will cause rebase conflicts for all team members.\n\n## Output Format\n\n```\nGitleaks Secret Scanning Report\n=================================\nRepository: org\u002Fweb-application\nScan Type: Full History\nCommits Scanned: 4,523\nDate: 2026-02-23\n\nFINDINGS:\n  Total: 12\n  New (not in baseline): 3\n  Baseline (pre-existing): 9\n\nNEW FINDINGS (blocking):\n  [1] AWS Access Key ID\n      Rule: aws-access-key-id\n      File: src\u002Fconfig\u002Faws.py:23\n      Commit: a1b2c3d (2026-02-22, dev@company.com)\n      Secret: AKIA...REDACTED\n      Entropy: 3.8\n\n  [2] GitHub Personal Access Token\n      Rule: github-pat\n      File: scripts\u002Fdeploy.sh:15\n      Commit: d4e5f6g (2026-02-21, ops@company.com)\n      Secret: ghp_...REDACTED\n      Entropy: 4.2\n\n  [3] Internal API Token\n      Rule: internal-api-token\n      File: src\u002Fservices\u002Fauth.py:89\n      Commit: h7i8j9k (2026-02-20, dev@company.com)\n\nQUALITY GATE: FAILED (3 new findings)\nAction: Rotate exposed credentials immediately.\n```\n","# Implementing Secret Scanning with Gitleaks\n\n## When to Use\n\n- When developers may accidentally commit API keys, passwords, tokens, or private keys to repositories\n- When establishing pre-commit gates that prevent secrets from entering the git history\n- When scanning existing repository history for previously committed secrets that need rotation\n- When compliance requirements mandate secret detection across all source code repositories\n- When migrating from manual secret audits to automated continuous scanning\n\n**Do not use** for detecting secrets in running applications or memory (use runtime secret detection), for managing secrets after detection (use Vault or AWS Secrets Manager), or for scanning container images (use Trivy or Grype).\n\n## Prerequisites\n\n- Gitleaks v8.18+ installed via binary, Go install, or Docker\n- Pre-commit framework installed for local hook integration\n- Git repository with history to scan\n- CI\u002FCD platform access (GitHub Actions, GitLab CI, or equivalent)\n\n## Workflow\n\n### Step 1: Install and Run Initial Repository Scan\n\nPerform a baseline scan of the repository to identify all existing secrets in the git history.\n\n```bash\n# Install Gitleaks\nbrew install gitleaks  # macOS\n# or download binary from https:\u002F\u002Fgithub.com\u002Fgitleaks\u002Fgitleaks\u002Freleases\n\n# Scan entire git history for secrets\ngitleaks detect --source . --report-format json --report-path gitleaks-report.json -v\n\n# Scan only staged changes (for pre-commit)\ngitleaks protect --staged --report-format json --report-path gitleaks-staged.json\n\n# Scan specific commit range\ngitleaks detect --source . --log-opts=\"HEAD~10..HEAD\" --report-format json\n\n# Scan without git history (filesystem only)\ngitleaks detect --source . --no-git --report-format json\n```\n\n### Step 2: Configure Pre-Commit Hook\n\nSet up Gitleaks as a pre-commit hook to prevent secrets from being committed.\n\n```yaml\n# .pre-commit-config.yaml\nrepos:\n  - repo: https:\u002F\u002Fgithub.com\u002Fgitleaks\u002Fgitleaks\n    rev: v8.21.2\n    hooks:\n      - id: gitleaks\n        name: gitleaks\n        description: Detect hardcoded secrets using Gitleaks\n        entry: gitleaks protect --staged --verbose --redact\n        language: golang\n        pass_filenames: false\n```\n\n```bash\n# Install pre-commit framework\npip install pre-commit\n\n# Install hooks defined in .pre-commit-config.yaml\npre-commit install\n\n# Run against all files (not just staged)\npre-commit run gitleaks --all-files\n\n# Test the hook with a deliberate secret\necho 'AWS_SECRET_ACCESS_KEY=\"wJalrXUtnFEMI\u002FK7MDENG\u002FbPxRfiCYEXAMPLEKEY\"' >> test.txt\ngit add test.txt\ngit commit -m \"test\"  # Should be blocked by gitleaks\n```\n\n### Step 3: Integrate into GitHub Actions\n\n```yaml\n# .github\u002Fworkflows\u002Fsecret-scanning.yml\nname: Secret Scanning\n\non:\n  push:\n    branches: [main, develop]\n  pull_request:\n    branches: [main]\n\njobs:\n  gitleaks:\n    name: Gitleaks Secret Scan\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n        with:\n          fetch-depth: 0  # Full history for comprehensive scanning\n\n      - name: Run Gitleaks\n        uses: gitleaks\u002Fgitleaks-action@v2\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}  # Required for gitleaks-action v2\n\n      # Alternative: Run Gitleaks directly\n      - name: Install Gitleaks\n        run: |\n          wget -q https:\u002F\u002Fgithub.com\u002Fgitleaks\u002Fgitleaks\u002Freleases\u002Fdownload\u002Fv8.21.2\u002Fgitleaks_8.21.2_linux_x64.tar.gz\n          tar -xzf gitleaks_8.21.2_linux_x64.tar.gz\n          chmod +x gitleaks\n\n      - name: Scan for secrets\n        run: |\n          if [ \"${{ github.event_name }}\" == \"pull_request\" ]; then\n            .\u002Fgitleaks detect \\\n              --source . \\\n              --log-opts=\"${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}\" \\\n              --report-format sarif \\\n              --report-path gitleaks.sarif \\\n              --exit-code 1\n          else\n            .\u002Fgitleaks detect \\\n              --source . \\\n              --report-format sarif \\\n              --report-path gitleaks.sarif \\\n              --exit-code 1 \\\n              --baseline-path .gitleaks-baseline.json\n          fi\n\n      - name: Upload SARIF\n        if: always()\n        uses: github\u002Fcodeql-action\u002Fupload-sarif@v3\n        with:\n          sarif_file: gitleaks.sarif\n          category: gitleaks\n```\n\n### Step 4: Author Custom Detection Rules\n\nCreate organization-specific rules for internal secret patterns.\n\n```toml\n# .gitleaks.toml\ntitle = \"Organization Gitleaks Configuration\"\n\n[extend]\nuseDefault = true  # Include all default rules\n\n# Custom rule for internal API tokens\n[[rules]]\nid = \"internal-api-token\"\ndescription = \"Internal API token for service-to-service auth\"\nregex = '''(?i)x-internal-token[\"\\s:=]+[\"\\']?([a-zA-Z0-9_\\-]{40,})[\"\\']?'''\nentropy = 3.5\nkeywords = [\"x-internal-token\"]\ntags = [\"internal\", \"api\"]\n\n[[rules]]\nid = \"database-connection-string\"\ndescription = \"Database connection string with embedded credentials\"\nregex = '''(?i)(postgres|mysql|mongodb|redis):\u002F\u002F[^:]+:[^@]+@[^\u002F]+\u002F\\w+'''\nkeywords = [\"postgres:\u002F\u002F\", \"mysql:\u002F\u002F\", \"mongodb:\u002F\u002F\", \"redis:\u002F\u002F\"]\ntags = [\"database\", \"credentials\"]\n\n[[rules]]\nid = \"jwt-secret\"\ndescription = \"JWT signing secret\"\nregex = '''(?i)(jwt[_-]?secret|jwt[_-]?key)[\"\\s:=]+[\"\\']?([a-zA-Z0-9\u002F+_\\-]{32,})[\"\\']?'''\nentropy = 3.0\nkeywords = [\"jwt_secret\", \"jwt-secret\", \"jwt_key\", \"jwt-key\"]\n\n# Allowlist for test files and known safe patterns\n[allowlist]\ndescription = \"Global allowlist\"\npaths = [\n  '''(^|\u002F)test(s)?\u002F''',\n  '''(^|\u002F)spec\u002F''',\n  '''\\.test\\.(js|ts|py)$''',\n  '''\\.spec\\.(js|ts|py)$''',\n  '''__mocks__\u002F''',\n  '''fixtures\u002F''',\n  '''(^|\u002F)vendor\u002F''',\n  '''node_modules\u002F'''\n]\nregexes = [\n  '''EXAMPLE''',\n  '''example\\.com''',\n  '''test[-_]?(key|secret|token|password)''',\n  '''(?i)placeholder''',\n  '''000000+'''\n]\n```\n\n### Step 5: Manage Baselines for Existing Repositories\n\nCreate a baseline of known findings to avoid blocking development while historical secrets are being rotated.\n\n```bash\n# Generate baseline from current state\ngitleaks detect --source . --report-format json --report-path .gitleaks-baseline.json\n\n# Subsequent scans compare against baseline (only new findings trigger failures)\ngitleaks detect --source . --baseline-path .gitleaks-baseline.json --exit-code 1\n\n# Review baseline periodically and remove entries as secrets are rotated\ncat .gitleaks-baseline.json | python3 -m json.tool | head -50\n```\n\n### Step 6: Remediate Exposed Secrets\n\nWhen a secret is detected, follow the rotation and history cleanup procedure.\n\n```bash\n# 1. Immediately rotate the exposed credential\n#    - Revoke the old API key\u002Ftoken in the service provider\n#    - Generate a new credential\n#    - Store the new credential in a secrets manager\n\n# 2. Remove secret from git history using git-filter-repo\npip install git-filter-repo\n\n# Create expressions file for secrets to remove\ncat > \u002Ftmp\u002Fexpressions.txt \u003C\u003C 'EOF'\nregex:AKIA[0-9A-Z]{16}==>REDACTED_AWS_KEY\nregex:(?i)password\\s*=\\s*\"[^\"]*\"==>password=\"REDACTED\"\nEOF\n\ngit filter-repo --replace-text \u002Ftmp\u002Fexpressions.txt --force\n\n# 3. Force-push the cleaned history (coordinate with team)\n# git push --force --all  # WARNING: Requires team coordination\n\n# 4. Add the secret pattern to .gitleaks.toml rules\n# 5. Update the baseline file to remove the resolved finding\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Secret | Any credential, token, key, or sensitive string that should not appear in source code |\n| Pre-commit Hook | Git hook that runs before a commit is created, blocking commits containing detected secrets |\n| Entropy | Measure of randomness in a string; high-entropy strings are more likely to be secrets |\n| Baseline | Snapshot of existing findings used to differentiate new secrets from pre-existing ones |\n| Allowlist | Configuration specifying paths, patterns, or commits to exclude from detection |\n| SARIF | Static Analysis Results Interchange Format for uploading findings to security dashboards |\n| git-filter-repo | Tool for rewriting git history to remove sensitive data from all commits |\n\n## Tools & Systems\n\n- **Gitleaks**: Open-source secret detection tool supporting pre-commit hooks, CI\u002FCD, and historical scanning\n- **pre-commit**: Framework for managing and maintaining multi-language pre-commit hooks\n- **git-filter-repo**: History rewriting tool for removing secrets from git history\n- **TruffleHog**: Alternative secret scanner with verified secret detection capabilities\n- **GitHub Secret Scanning**: Native GitHub feature that detects secrets matching partner patterns\n\n## Common Scenarios\n\n### Scenario: Onboarding Secret Scanning on a Legacy Repository\n\n**Context**: A 5-year-old repository has never been scanned. The team needs to enable secret scanning without blocking all development while historical secrets are rotated.\n\n**Approach**:\n1. Run `gitleaks detect` against full history and generate a baseline JSON file\n2. Triage each finding: classify as active (needs rotation), inactive (already rotated), or false positive\n3. Immediately rotate all active secrets and update consuming services\n4. Commit the baseline file (excluding active secrets that have been fixed)\n5. Enable pre-commit hooks for new development immediately\n6. Add CI\u002FCD scanning with the baseline to catch only new secrets\n7. Progressively reduce the baseline as historical secrets are rotated\n\n**Pitfalls**: Generating a baseline without triaging means accepting risk on unrotated secrets. Never assume a historical secret is inactive without verifying with the service provider. Running git-filter-repo on a shared repository without coordination will cause rebase conflicts for all team members.\n\n## Output Format\n\n```\nGitleaks Secret Scanning Report\n=================================\nRepository: org\u002Fweb-application\nScan Type: Full History\nCommits Scanned: 4,523\nDate: 2026-02-23\n\nFINDINGS:\n  Total: 12\n  New (not in baseline): 3\n  Baseline (pre-existing): 9\n\nNEW FINDINGS (blocking):\n  [1] AWS Access Key ID\n      Rule: aws-access-key-id\n      File: src\u002Fconfig\u002Faws.py:23\n      Commit: a1b2c3d (2026-02-22, dev@company.com)\n      Secret: AKIA...REDACTED\n      Entropy: 3.8\n\n  [2] GitHub Personal Access Token\n      Rule: github-pat\n      File: scripts\u002Fdeploy.sh:15\n      Commit: d4e5f6g (2026-02-21, ops@company.com)\n      Secret: ghp_...REDACTED\n      Entropy: 4.2\n\n  [3] Internal API Token\n      Rule: internal-api-token\n      File: src\u002Fservices\u002Fauth.py:89\n      Commit: h7i8j9k (2026-02-20, dev@company.com)\n\nQUALITY GATE: FAILED (3 new findings)\nAction: Rotate exposed credentials immediately.\n```\n",{"name":5,"tags":24,"author":31,"domain":32,"license":14,"version":33,"nist_csf":34,"subdomain":25,"description":39,"mitre_attack":40},[25,26,27,28,29,30],"devsecops","cicd","secret-scanning","gitleaks","pre-commit","secure-sdlc","mahipal","cybersecurity","1.0.0",[35,36,37,38],"PR.PS-01","GV.SC-07","ID.IM-04","PR.PS-04","This skill covers implementing Gitleaks for detecting and preventing hardcoded secrets in git repositories. It addresses configuring pre-commit hooks, CI\u002FCD pipeline integration, custom rule authoring for organization-specific secrets, baseline management for existing repositories, and remediation workflows for exposed credentials.\n",[41,42,43,44,45],"T1195","T1554","T1059.004","T1003","T1110","main","1eb986d0b0ecc180291597e08eb5a58288843536","skills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fimplementing-secret-scanning-with-gitleaks","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv","2026-08-25 13:16:33",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add vikasvardhanv\u002Fjerry_skills --skill implementing-secret-scanning-with-gitleaks",{"tool":58,"command":59},"bunx","bunx skills add vikasvardhanv\u002Fjerry_skills --skill implementing-secret-scanning-with-gitleaks",{"tool":61,"command":62},"pnpm","pnpm dlx skills add vikasvardhanv\u002Fjerry_skills --skill implementing-secret-scanning-with-gitleaks","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fimplementing-secret-scanning-with-gitleaks\u002FSKILL.md",true,[66,72,76,82,86,90,96],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"assets\u002Ftemplate.md","ASSET","资产文件",4781,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fimplementing-secret-scanning-with-gitleaks\u002Fassets\u002Ftemplate.md",{"path":73,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":15},"LICENSE","许可证",11255,{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Fapi-reference.md","REFERENCE","参考文档",4621,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fimplementing-secret-scanning-with-gitleaks\u002Freferences\u002Fapi-reference.md",{"path":83,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Fstandards.md",2298,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fimplementing-secret-scanning-with-gitleaks\u002Freferences\u002Fstandards.md",{"path":87,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":88,"sourceHtmlUrl":89},"references\u002Fworkflows.md",5114,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fimplementing-secret-scanning-with-gitleaks\u002Freferences\u002Fworkflows.md",{"path":91,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":94,"sourceHtmlUrl":95},"scripts\u002Fagent.py","SCRIPT","脚本",7420,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fimplementing-secret-scanning-with-gitleaks\u002Fscripts\u002Fagent.py",{"path":97,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":98,"sourceHtmlUrl":99},"scripts\u002Fprocess.py",9999,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fimplementing-secret-scanning-with-gitleaks\u002Fscripts\u002Fprocess.py",[101,109,116,123,130,137],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":105,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":19},"01M7BESR1CJ3H5SP9XM8KYJZ9W","syllabus","Generates a curated supplementary reading list from any course syllabus using Consensus academic search. Grill-me intake (syllabus input format + course audience + year range) plus a grouping forcing-options checkpoint before any search runs — so the reading list matches the course's level and recency need. Parses the syllabus to extract topics and learning outcomes, searches Consensus for recent peer-reviewed papers per topic, and produces a professionally formatted .docx with clickable Consensus links, plain-language summaries calibrated to audience level, and Bloom-higher-order discussion questions tied to course learning goals. Use when the user uploads a syllabus, course outline, or curriculum document and wants supplementary readings (e.g., 'create a reading list from this syllabus', 'find recent papers for my course') — even casual mentions with a syllabus attached should trigger this skill.","MIT","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fsyllabus\u002Fskills\u002Fsyllabus\u002FSKILL.md",[],[],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":105,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":19},"01M7BES1YA6R97W7QPMFFM1PED","pulse","Multi-source recency research skill that takes the pulse of any topic across Reddit, Hacker News, the open web, and optionally X\u002FTwitter within a configurable recent window (default 30 days). Forcing intake clarifies topic specificity, angle (trend\u002Fsentiment\u002Fproblems\u002Fopportunities\u002Fcomparison), time window, and platform scope before searching. Returns a synthesized briefing with citations, engagement metrics, and cross-platform pattern analysis. Use when the user requests multi-source recency intelligence on a topic (e.g., 'pulse on [topic]', 'what's happening with [topic]', 'what are people saying about [topic]', 'current conversation about [topic]', 'take the pulse of [topic]', 'trending: [topic]', 'find me info on [topic]'), and for competitor research, trend discovery, tool comparisons, and audience sentiment analysis.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpulse\u002Fskills\u002Fpulse\u002FSKILL.md",[],[],{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":105,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":19},"01M7BERNHYGY035AR00VRT03KE","patent","Patent prior-art and landscape intelligence skill — not generic patent help. Commits to one of five sub-use-cases via forcing intake (novelty search \u002F freedom-to-operate \u002F competitive landscape \u002F acquisition diligence \u002F litigation prior-art) before any search runs. Searches Google Patents, Espacenet, USPTO, and optionally Lens.org for citation-graph signals. Output is an editable Word document (.docx) with verdict, ranked closest art (claim-text extracted), CPC-class-aware landscape, family-resolved hits, geographic coverage, FTO flags where applicable, strategy recommendations, and full audit log. Use when the user asks for patent searching or analysis (e.g., 'prior art search for [invention]', 'freedom to operate analysis for [product]'). Produces search signal, not legal advice — always recommends consulting a patent attorney before filing or licensing decisions. Trademark, copyright, and trade-secret questions are out of scope.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpatent\u002Fskills\u002Fpatent\u002FSKILL.md",[],[],{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":105,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":19},"01M7BERCK1EAKTWW7R436WAR0J","notebooklm","Browser automation skill for controlling Google's NotebookLM. Use when the user wants anything done in NotebookLM (e.g., 'open NotebookLM', 'check my [name] notebook', 'ask my notebook about X', 'add [source] to NotebookLM', 'generate a Video Overview from my notebook', 'use NotebookLM Studio'). Handles reading and querying notebooks, adding sources (URLs, text, files, YouTube links, synthesized content), generating Studio outputs (Audio\u002FVideo Overviews, Mind Maps, Reports incl. Briefing Doc\u002FStudy Guide\u002FFAQ, Flashcards, Quiz, slide decks, infographics — discover the exact set from the live Studio panel; the UI evolves fast), and creating new notebooks. Requires browser automation environment — fails gracefully when unavailable.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fnotebooklm\u002Fskills\u002Fnotebooklm\u002FSKILL.md",[],[],{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":105,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":19},"01M7BEQZAZAQRTXFJRY7RHV3TY","litreview","Academic literature orientation skill that searches papers via free keyless APIs (PubMed E-utilities + OpenAlex) by default — with the Consensus MCP as an optional enhancement lane when connected — builds a strategic search plan using PICO (default) or SPIDER \u002F Decomposition \u002F hybrid as fallbacks, and synthesizes findings into a formatted Word (.docx) research guide. Grill-me intake (research question specificity + framework hint + tentative depth) before the recon search; a second forcing checkpoint after Phase 2 confirms framework + sub-areas + depth before searches consume budget. Configurable depth (5\u002F10\u002F20 queries) controls coverage vs. speed. Output is a 'launching pad' — an orientation guide that lets a researcher dive in confidently, not a finished review. Use when the user starts literature-oriented research (e.g., 'litreview on [topic]', 'literature review on [topic]', 'I'm starting a literature review on X', 'I'm writing a paper on X', 'help me research X', 'I'm doing research on X', 'can you help me research X'). Do NOT use for single one-off paper searches wanting a quick list — that's a plain PubMed\u002FOpenAlex (or Consensus) query.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Flitreview\u002Fskills\u002Flitreview\u002FSKILL.md",[],[],{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":105,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":19},"01M7BEQKJ45K31QK5VRAQSVJCJ","grants","NIH grant research skill for clinical researchers. Grill-me intake (research idea + career stage + preliminary data + environment + submission posture + known institute targets) locks down the funding strategy before any search runs. Runs a 5-facet Consensus positioning analysis (with draft Significance\u002FInnovation language), maps the research to the right NIH institutes and study sections via RePORTER, finds NOSIs and funded overlap, and produces an editable Word document (.docx) with budget\u002Fscope-aware mechanism recommendations, submission timelines, and a mandatory program officer recommendation. Use when the user asks about research funding or makes any grant-related request (e.g., 'grants for [topic]', 'find grants for my research idea', 'what grants match my research', 'help me find NIH funding', 'grant opportunities for my research'). NIH-only scope — non-NIH funders (PCORI, DOD CDMRP, VA, foundations) are out of scope and flagged at intake.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fgrants\u002Fskills\u002Fgrants\u002FSKILL.md",[],[]]