Skip to content
Skills Library
Security · Review & audit

secrets-detection

/secrets-detection

Find and remediate exposed credentials: hardcoded secrets, public .env files, secrets in Git history, frontend bundles and logs, and exposed database credentials. Use when reviewing config, preparing a release, or after a suspected leak.

Repository
VibeGuard ↗
Licence
MIT
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Find and remediate exposed credentials: hardcoded secrets, public .env files, secrets in Git history, frontend bundles and logs, and exposed database credentials. Use when reviewing config, preparing a release, or after a suspected leak.

Original author description

Find and remediate exposed credentials: hardcoded secrets, public .env files, secrets in Git history, frontend bundles and logs, and exposed database credentials. Use when reviewing config, preparing a release, or after a suspected leak.

How it works

  1. Objective
  2. When to Use
  3. Scope
  4. Workflow
  5. Detection Methods
  6. Coverage
  7. Remediation
  8. Verification
  9. Limitations
  10. Output Format
Original SKILL.md headings · 139 lines, 1,044 words
SKILL.md preview
---
name: secrets-detection
description: 'Find and remediate exposed credentials: hardcoded secrets, public .env files, secrets in Git history, frontend bundles and logs, and exposed database credentials. Use when reviewing config, preparing a release, or after a suspected leak.'
license: MIT
metadata:
  category: security
  version: 0.1.0
---

# Secrets Detection

## Objective

Locate credential exposure, confirm it with evidence, rotate and relocate secrets, and verify no exposure remains.

## When to Use

Use when: reviewing config, preparing a release, or after a suspected leak.

Do not use for: General vulnerability review (use security-audit); license or PII compliance scanning.

## Scope

Working tree, Git history, build output, container contexts, CI config, logs and public web paths of a test deployment.

## Workflow

1. Inspect the project (language, framework, dependencies, data stores, auth model, deployment target, test commands) before changing anything.
2. Select only the checks below that apply to the actual stack; record those skipped and why.
3. Treat any exposed secret as compromised: rotate first (human approval), then clean up.
4. Never paste real secret values into reports, tickets or prompts; reference file and line only.
5. Add .gitignore/.dockerignore entries and a pre-commit or CI secret scan.
6. Classify each result as **confirmed** (reproduced or directly evidenced by file and line, command output, or request/response) or **suspected** (pattern match or inference). Never present a suspicion as a confirmed finding.
7. Rank by severity, exploitability, exposure, confidence and business impact.
8. Explain the planned change, its effect, tests and possible breaking behaviour before any risky operation.
9. Make focused changes that preserve existing behaviour; avoid unrelated rewrites.
10. Verify using the commands under Verification and record exact outcomes.

## Detection Methods

- Dedicated scanners where installed (gitleaks, trufflehog, detect-secrets); run them locally, never upload code.
- `python scripts/scan_project.py` for candidate patterns; values are never printed.
- Inspect production build output and public env prefixes.
- Review logging statements and sample log output.

## Coverage

Items this skill owns. Each is individually traceable in `registry/coverage.json`.

### SEC-01 — Exposed database credentials

- **Detect:** Search config, code, CI files, container images and history for connection strings with embedded passwords; check whether the DB port is reachable from the public internet.
- **Fix:** Move credentials to a secret manager or runtime environment; rotate any exposed credential (human approval); restrict DB network access.
- **Verify:** Re-scan working tree and history; confirm the old credential no longer authenticates; confirm DB port unreachable from outside the allowed network.
- **Also involves:** `cloud-config`

### SEC-02 — Public .env files

- **Detect:** Check that .env* is git-ignored and absent from build output, Docker contexts and web roots; request /.env on a deployed test host.
- **Fix:** Add .env* to .gitignore and .dockerignore; keep only a placeholder .env.example; configure the web server to deny dotfiles.
- **Verify:** Fetch /.env and variants against the deployed build: expect 403/404 and no secret content. Confirm `git ls-files` lists no real .env.
- **Also involves:** `cloud-config`

### SEC-03 — Hardcoded secrets

- **Detect:** Run a dedicated secret scanner (e.g. gitleaks, trufflehog, detect-secrets) plus entropy and keyword review of source, tests, notebooks and IaC.
- **Fix:** Replace literals with environment or secret-manager lookups; fail fast at startup when a required secret is missing; rotate exposed values.
- **Verify:** Scanner reports zero verified findings (document allowlisted false positives); app fails clearly when a secret is unset.

### SEC-11 — Secrets in logs

- **Detect:** Search logging calls for request bodies, headers, tokens, connection strings, and objects serialized whole; inspect sample logs.
- **Fix:** Add redaction in the logger (authorization, cookie, password, token, key fields); log identifiers not payloads.
- **Verify:** Test that a request containing a canary secret never appears in captured log output.
- **Also involves:** `logging-monitoring-backups`

### SEC-13 — Secrets in Git history

- **Detect:** Scan full history and all branches/tags (e.g. gitleaks/trufflehog in git mode), including deleted files.
- **Fix:** Rotate the secret first (human approval). History rewriting is optional, destructive and needs explicit approval; deletion from HEAD alone is not a fix.
- **Verify:** History scan shows no active secrets; the exposed credential is confirmed revoked.

### SEC-14 — Secrets in frontend JavaScript

- **Detect:** Inspect built bundles, HTML, source maps and public env prefixes (NEXT_PUBLIC_, VITE_, REACT_APP_) for private keys or privileged tokens.
- **Fix:** Move privileged calls to a backend; only publishable/public keys may reach the client; rotate leaked keys.
- **Verify:** Grep production build output for known secret patterns and key names; confirm the client works using only public keys.
- **Also involves:** `web-input-security`

### PROD-03 — Remove frontend secrets

- **Detect:** Scan bundles and public env prefixes.
- **Fix:** Move privileged operations to the server; rotate leaked keys.
- **Verify:** Production build scan clean; see SEC-14.
- **Also involves:** `production-readiness`

### Supporting Role

Items owned elsewhere where this skill contributes:

- `SEC-26` Exposed or weak JWT secrets and validation (owner: `session-jwt-oauth`)
- `SEC-30` Default credentials (owner: `authentication-authorization`)
- `SEC-36` Exposed source maps (owner: `cloud-config`)

## Remediation

- Apply the smallest change that removes the confirmed problem; keep public behaviour stable.
- Prefer maintained libraries and platform features over custom implementations.
- Require human approval before: destructive changes, credential rotation, production deployment, external side effects, or material cloud permission changes.
- Add or update an automated regression test for each fix where practical.

## Verification

- Run the **Verify** step for every item touched; record the exact command and observed result.
- Run the project's existing tests, linter, type checker and build.
- Re-run the relevant scanner or check after the fix and compare with the baseline.
- Report any check that could not run as **unverified**, with the reason. Never report a pass for a check that did not execute.
- A passing checklist does not show the system is secure; state residual risk.

## Limitations

- Pattern and entropy scans produce false positives and negatives.
- Rewriting Git history is destructive and does not revoke leaked secrets.
- Cannot confirm a credential is revoked without the owner testing it.
- Findings that depend on business intent, legal interpretation or production state need human review.

## Output Format

Report each finding as:

```text
ID: <coverage ID>   Severity: <Critical|High|Medium|Low|Info>   Confidence: <confirmed|likely|possible>
Location: <file:line or URL path>
Evidence: <command output or request/response excerpt; secrets redacted>
Impact: <what an attacker or user could do>
Fix: <change made or proposed>
Verification: <command run and result, or 'unverified: reason'>
```

End with: commands executed, checks skipped or unavailable, residual risks, and items needing human decision.

## Related Skills

- `cloud-config`
- `logging-monitoring-backups`
- `dependency-supply-chain`

Versions

RepositoryScoreLicence
This page · honorx12/VibeGuard100MIT
Habitat-Thinking/ai-literacy-superpowers100Apache-2.0

Database snapshot: 13.11.2026 · package version ea2623d16d5b (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100secrets-scanner
    Detects hardcoded secrets (API keys, tokens, passwords, private keys, connection strings) in source, config files and git history, language-agnostic, with severity triage and remediation steps. Use when asked to scan for secrets, find leaked credentials or audit exposed tokens.
  • 90secrets-management-audit
    Use when hunting for exposed secrets and auditing how an app you own manages them — API keys, tokens, passwords, and private keys in source, git history, binaries, logs, config, and CI; plus vaulting, rotation, and least-privilege of the secrets themselves.
  • 100secrets
    This skill should be used when the user asks to "check for secrets", "find hardcoded credentials", "scan for API keys", "detect leaked tokens", "find passwords in code", "check for committed .env files", "scan for private keys", or mentions "secrets", "credentials", "API keys",…
  • 90secrets-handling
    Find, store, rotate, or prevent exposure of credentials and sensitive configuration. Use when reviewing env files, logs, CI, deployment settings, client bundles, or incident response for a leaked key.
  • 100scanning-for-secrets
    Detect exposed secrets, API keys, and credentials in code. Use when auditing for secret leaks. Trigger with 'scan for secrets', 'find exposed keys', or 'check credentials'.
  • 100scanning-for-secrets
    Detect exposed secrets, API keys, and credentials in code. Use when auditing for secret leaks. Trigger with 'scan for secrets', 'find exposed keys', or 'check credentials'.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.