
Brewtools:Secrets Scan
- 6 installs
- 29 repo stars
- Updated August 2, 2026
- kochetkov-ma/claude-brewcode
Helps with ai & agent building tasks.
About
brewtools:secrets-scan is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- brewtools:secrets-scan
- AI & Agent Building
- AI-coding skill
Brewtools:Secrets Scan by the numbers
- 6 all-time installs (skills.sh)
- +1 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #12,825 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/kochetkov-ma/claude-brewcode --skill brewtoolssecrets-scanAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 6 |
|---|---|
| repo stars | ★ 29 |
| Last updated | August 2, 2026 |
| Repository | kochetkov-ma/claude-brewcode ↗ |
What it does
Helps with ai & agent building tasks.
Files
Secrets Scan
<phase name="1-setup">
Phase 1: Setup
EXECUTE using Bash tool:
git rev-parse --is-inside-work-tree 2>/dev/null || { echo "ERROR: Not git repo"; exit 1; }
REPO=$(git rev-parse --show-toplevel) && cd "$REPO"
TS=$(date +%Y%m%d-%H%M%S)
DIR="$REPO/.claude/reports/${TS}_secrets-scan" && mkdir -p "$DIR"
git ls-files > "$DIR/files.txt"
echo "DIR=$DIR|REPO=$REPO|TS=$TS|TOTAL=$(wc -l < "$DIR/files.txt" | tr -d ' ')"
cat "$DIR/files.txt"STOP if ERROR — must run in git repository.
</phase>
<phase name="2-parallel-scan">
Phase 2: Split & Launch 10 Agents
1. Parse file list → split into 10 chunks (ceil(total/10)) 2. Send 10 Task calls in parallel (single message)
Config: Task(subagent_type="general-purpose", model="haiku", description="Agent N/10 scan")
<agent-prompt> Agent {N}/10 secrets scanner.
FILES: {FILES}
Read each file → detect secrets → return JSON.
PATTERNS:
| Category | Match |
|---|---|
| Passwords | password/passwd/secret/pwd + = or : |
| API Keys | api_key, access_key, apikey, api_secret |
| Tokens | token, bearer, auth_token, access_token |
| AWS | AKIA[0-9A-Z]{16}, aws_secret, aws_access_key |
| DB URLs | jdbc/mongodb/mysql/postgres with credentials |
| Keys | -----BEGIN.*PRIVATE KEY-----, client_secret, encryption_key |
CRITICALITY:
| Level | Criteria |
|---|---|
| CRITICAL | Real credentials, private keys, DB connection strings |
| HIGH | Real API keys/tokens, AWS creds |
| MEDIUM | Suspicious hardcoded values |
| LOW | Placeholders: changeme, YOUR_KEY, xxx, dummy |
SKIP: env refs (process.env.*, ${VAR}, os.getenv()), placeholders, docs/comments.
OUTPUT (JSON):
{"agent":{N},"scanned":["f1","f2"],"skipped":[{"path":"x","reason":"binary"}],"findings":[{"path":"f","line":1,"content":"pwd=x","desc":"Hardcoded pwd","crit":"HIGH"}]}No findings: "findings":[] </agent-prompt>
</phase>
<phase name="3-merge">
Phase 3: Merge Results
1. Collect 10 JSON responses 2. Parse each (handle errors gracefully) 3. Merge scanned[], skipped[], findings[] 4. Dedupe by path+line 5. Sort: CRITICAL → HIGH → MEDIUM → LOW
</phase>
<phase name="4-report">
Phase 4: Generate Report
Write {DIR}/report.md:
<report-template>
Secrets Scan Report
Scan: {TS} | Repo: {REPO} | Files: {TOTAL} | Agents: 10
Summary
| Metric | Count |
|---|---|
| Scanned | {N} |
| Skipped | {N} |
| CRITICAL | {N} |
| HIGH | {N} |
| MEDIUM | {N} |
| LOW | {N} |
Findings
CRITICAL ({N})
| # | File | Line | Content | Description |
|---|
{ROWS}
HIGH / MEDIUM / LOW
(same table format)
Agent Stats
| Agent | Assigned | Scanned | Findings |
|---|---|---|---|
| 1-10 | ... | ... | ... |
| Total | {N} | {N} | {N} |
File Inventory
Scanned ({N})
| # | Path | Agent |
|---|
{ALL}
Skipped ({N})
| # | Path | Reason |
|---|
{SKIP} </report-template>
</phase>
<phase name="5-summary">
Phase 5: Display Summary
## Secrets Scan Complete
| Metric | Value |
|--------|-------|
| Files | {N} |
| CRITICAL | {N} |
| HIGH | {N} |
| MEDIUM | {N} |
| LOW | {N} |
Report: {DIR}/report.md</phase>
<phase name="6-fix">
Phase 6: Fix Mode
Trigger: --fix arg OR CRITICAL/HIGH findings exist → AskUserQuestion
| Option | Action |
|---|---|
| Fix interactively | Review each: delete, move to env var, add to .gitignore, skip, mark false positive |
| Add to .gitignore | Append paths |
| Skip | Done |
</phase>
MIT License
Copyright (c) 2025-2026 Maxim Kochetkov (kochetkov-ma)
https://github.com/kochetkov-ma/claude-brewcode
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Secrets Scan
Security audit for leaked credentials in git-tracked files. Spawns 10 parallel agents to scan the entire repository, classifies findings by severity, and generates a detailed report with optional interactive remediation.
Quick Start
/brewtools:secrets-scanModes
| Mode | How to trigger | What it does |
|---|---|---|
| Scan only | /brewtools:secrets-scan | Scans all git-tracked files, generates severity-ranked report |
| Scan + fix | /brewtools:secrets-scan --fix | Scans, then walks through each CRITICAL/HIGH finding interactively |
| Auto-fix prompt | No flag needed | If CRITICAL or HIGH findings exist, prompts whether to remediate |
Fix mode options per finding:
| Option | Action |
|---|---|
| Fix | Delete or replace the secret inline |
| Move to env var | Extract value into environment variable reference |
| Add to .gitignore | Append the file path to .gitignore |
| Mark false positive | Acknowledge and skip |
| Skip | Leave as-is, move to next finding |
Examples
Good Usage
# Pre-commit security check on the full repo
/brewtools:secrets-scan
# Scan and fix all findings interactively
/brewtools:secrets-scan --fix
# Run after onboarding a new contributor to verify no secrets leaked
/brewtools:secrets-scan
# Run before open-sourcing a private repo
/brewtools:secrets-scan --fix
# Periodic audit as part of a security review cycle
/brewtools:secrets-scanCommon Mistakes
# Running outside a git repository -- the skill requires git-tracked files
cd /tmp && /brewtools:secrets-scan
# ERROR: Not git repo
# Ignoring CRITICAL findings -- always remediate HIGH and CRITICAL before pushing
/brewtools:secrets-scan
# -> 3 CRITICAL findings... (do not ignore these)
# Assuming a clean scan means zero risk -- the skill detects patterns, not all secrets
# Always combine with .gitignore rules and pre-commit hooks for defense in depthWhat It Detects
| Category | Examples |
|---|---|
| Passwords | password=, passwd:, secret=, pwd= followed by a value |
| API Keys | api_key, access_key, apikey, api_secret |
| Tokens | token, bearer, auth_token, access_token |
| AWS Credentials | AKIA[0-9A-Z]{16}, aws_secret, aws_access_key |
| Database URLs | JDBC, MongoDB, MySQL, PostgreSQL connection strings with embedded credentials |
| Private Keys | -----BEGIN ... PRIVATE KEY-----, client_secret, encryption_key |
Skipped automatically: environment variable references (process.env.*, ${VAR}, os.getenv()), common placeholders (changeme, YOUR_KEY, xxx, dummy), documentation comments, binary files.
Severity Levels
| Level | Criteria |
|---|---|
| CRITICAL | Real credentials, private keys, database connection strings with passwords |
| HIGH | Real API keys or tokens, AWS credentials |
| MEDIUM | Suspicious hardcoded values that may be secrets |
| LOW | Placeholder values like changeme, YOUR_KEY, xxx, dummy |
Output
Report location: .claude/reports/{TIMESTAMP}_secrets-scan/report.md
The report contains:
| Section | Content |
|---|---|
| Summary | File counts, severity breakdown (CRITICAL / HIGH / MEDIUM / LOW) |
| Findings | Per-severity tables with file path, line number, matched content, description |
| Agent Stats | Per-agent breakdown of assigned, scanned, and finding counts |
| File Inventory | Complete list of scanned files and skipped files with skip reasons |
A console summary is also displayed at the end of the scan with the key metrics and the path to the full report.
Tips
- Run early, run often. The best time to catch a leaked secret is before it reaches a remote branch. Use this skill as a pre-push check.
- Expect false positives. Pattern-based detection will flag test fixtures, example configs, and documentation snippets. Use
--fixto mark them as false positives and move on. - Combine with .gitignore. After identifying sensitive files, add them to
.gitignoreimmediately. The--fixmode offers this as a one-click option. - Check the LOW findings too. Placeholder values like
changemesometimes slip into production configs unchanged. A quick review of LOW findings can prevent configuration errors.
Documentation
Full docs: secrets-scan