Skip to content
Back to skills

Secret Scanning

ASecurity

Scan and lint codebases for hardcoded secrets using entropy analysis and regex heuristics. Use when the user asks to find leaked credentials, audit code for secrets, migrate hardcoded values to q-ring, or clean up a codebase before committing.

  • 6 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
ai-agentspythonrustgojavarubyphpkotlinc#shellnode

Works with

  • api

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add I4cTime/q-ring --skill secret-scanning --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Secret Scanning?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Secret Scanning
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/i4ctime-secret-scanning/badge)](https://www.skillsdirectory.com/skills/i4ctime-secret-scanning)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: secret-scanning
description: Scan and lint codebases for hardcoded secrets using entropy analysis and regex heuristics. Use when the user asks to find leaked credentials, audit code for secrets, migrate hardcoded values to q-ring, or clean up a codebase before committing.
---

# Secret Scanning

## When to Use

Activate when the user:
- Asks to scan a project for hardcoded secrets or credentials
- Wants to audit code before a commit or PR
- Needs to migrate hardcoded values from source files into q-ring
- Mentions "secret leak", "credential scan", or "lint for secrets"

## Workflow

### 1. Scan the codebase

Call `scan_codebase_for_secrets` with the project directory. The scanner uses:
- Regex heuristics matching common patterns (`api_key`, `secret`, `token`, `password`, etc.)
- Shannon entropy analysis (flags values with entropy > 3.5)
- Known prefix detection (`sk-`, `ghp_`, etc.)

It automatically skips `node_modules`, `.git`, binary files, lockfiles, and minified code.

### 2. Review findings

Each result includes:
- `file` and `line` — location
- `keyName` — the detected variable name
- `match` — the suspicious value
- `entropy` — Shannon entropy score
- `context` — the full line of code

Present findings grouped by file. Highlight high-entropy matches (> 4.0) as most likely to be real secrets.

### 3. Auto-fix with lint

Call `lint_files` with the list of affected files and `fix: true` to:
- Replace hardcoded values with `process.env.KEY` references (language-aware)
- Store the extracted values in q-ring automatically
- Support JS/TS, Python, Ruby, Go, Rust, Java, Kotlin, C#, PHP, and Shell

### 4. Verify cleanup

After fixing, re-run `scan_codebase_for_secrets` to confirm no secrets remain.

## Best Practices

- Run scanning before every PR or commit
- Ignore placeholder values (`your_api_key`, `replace_me`, `example`) — the scanner handles this automatically
- For files with false positives, values under 8 characters or with low entropy are already filtered

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.