secrets

Detect exposed secrets, credentials, and API keys in code and git history.

Updated Jul 22, 2026
One-click install
npx skills add https://github.com/Trigent-Software-Pvt-Ltd/trigen-aidlc --skill secrets-trigent-software-pvt-ltd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secrets
Source: https://github.com/Trigent-Software-Pvt-Ltd/trigen-aidlc/tree/main/plugins/security/skills/secrets
Command: npx skills add https://github.com/Trigent-Software-Pvt-Ltd/trigen-aidlc --skill secrets-trigent-software-pvt-ltd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Hardcoded credentials, API keys, and tokens accidentally committed to a codebase or buried in git history create serious security breach risks, and finding them manually across thousands of files and commits is impractical. ## Core Features & Use Cases - Multi-Tool Scanning: Uses TruffleHog, Gitleaks, detect-secrets, or git-secrets when available, with a Grep-based pattern fallback covering AWS keys, GitHub tokens, Stripe keys, database connection strings, private keys, and 700+ secret types. - Git History Analysis: Scans all commits to find secrets that were committed and later removed, classifying findings as active leaks, removed leaks, or false positives. - Remediation Guidance: Provides severity-ranked reports with step-by-step credential rotation instructions, git history scrubbing via BFG or git-filter-repo, .gitignore generation, and pre-commit hook setup. - Use Case: Before a release, run a comprehensive scan of your repository to discover an exposed AWS access key in config files, rotate it immediately, scrub it from git history, and install a pre-commit hook to prevent recurrence. ## Quick Start Ask the AI to scan the current repository for exposed secrets and credentials, optionally including git history.

Frequently Asked Questions about secrets

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

FAQPage Schema
How do I scan my repository for exposed secrets and API keys?

Run the secrets scan with no arguments to check the current codebase, or pass a path for a targeted scan. The skill uses TruffleHog or Gitleaks if installed, otherwise it falls back to Grep-based pattern matching for common credential formats.

TruffleHog vs Gitleaks for secret scanning, which should I use?

TruffleHog is preferred because it combines entropy analysis with pattern matching across 700+ secret types and can verify whether credentials are still active. Gitleaks is a lighter, faster alternative with 140+ built-in patterns and custom rule support.

Can I find secrets that were deleted from code but remain in git history?

Yes, pass the --history flag to scan all commits. Findings are classified as active leaks, removed leaks still present in history, or false positives, and the skill shows which commits introduced and removed each secret.

How do I remove a leaked secret from git history?

Use BFG Repo Cleaner or git filter-repo to delete the file or replace the secret text across all commits, then force push after coordinating with your team. The skill generates the exact commands and warns that history rewriting requires teammates to re-clone.

What happens if no secret scanning tools are installed?

The skill falls back to Grep-based pattern detection covering AWS keys, GitHub tokens, Stripe keys, database connection strings, private keys, and generic passwords. It warns that this method has higher false positive rates and no credential verification.

How do I prevent secrets from being committed in the future?

The skill can generate .gitignore rules for env files, credentials, and private keys, and install a pre-commit hook that runs TruffleHog to block commits containing secrets. It also recommends CI/CD scanning and secrets managers like AWS Secrets Manager or Vault.