agentleFS
jd-opensourcejd-opensource/JoySafeter/skills/pentest-secrets-exposure/SKILL.md

pentest-secrets-exposure

Skill312 starsChanged 10 months agoApache-2.0View on GitHub

Discover hardcoded credentials, leaked API keys, exposed configuration files, sensitive data in artifacts, and information disclosure via error handling.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Git History Mining: Search all commits for secrets added then removed.

    line 26
  2. Distinctive:

    Secret Validation: Test each discovered credential for active access, document scope, assess blast radius.

    line 31

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Pentest Secrets Exposure

Purpose

Spans multiple unchecked WSTG categories — CONF-03/04 (sensitive files, backups), INFO-05 (info leakage), ERRH-01/02 (error handling, stack traces). Shannon's pre-recon focuses on architecture, not systematic secrets discovery.

Prerequisites

Authorization Requirements

  • Written authorization with source code access scope (if white-box)
  • Git repository access for history mining (if applicable)
  • Target URL list for exposed file probing

Environment Setup

  • TruffleHog for git history secret scanning
  • GitLeaks for pattern-based secret detection
  • Semgrep with secrets ruleset
  • nuclei with exposure templates

Core Workflow

  1. Source Code Secrets: Scan for hardcoded API keys, DB credentials, JWT signing keys, encryption keys using pattern + entropy detection.
  2. Git History Mining: Search all commits for secrets added then removed. Check force-pushed branches. Analyze .gitignore for sensitive patterns.
  3. Exposed Config Files: Probe for .env, .git/config, .DS_Store, wp-config.php, application.yml, docker-compose.yml with credentials (WSTG-CONF-03/04).
  4. Error Handling Disclosure: Trigger stack traces, debug pages, verbose errors revealing internal paths, DB schemas, framework versions (WSTG-ERRH-01/02).
  5. Backup & Unreferenced Files: .bak, .old, .swp, ~files, editor temp files, DB dumps, log files with sensitive data.
  6. Client-Side Bundle Analysis: Extract API keys from JS bundles, source maps exposing server code, hardcoded tokens in mobile packages.
  7. Secret Validation: Test each discovered credential for active access, document scope, assess blast radius.

WSTG Coverage

WSTG IDTest NameStatus
WSTG-CONF-03Test File Extensions Handling for Sensitive Info✅
WSTG-CONF-04Review Old Backup and Unreferenced Files✅
WSTG-INFO-05Review Webpage Content for Information Leakage✅
WSTG-ERRH-01Test Improper Error Handling✅
WSTG-ERRH-02Test Stack Traces✅

Tool Categories

CategoryToolsPurpose
Git ScanningTruffleHog, GitLeaksSecret detection in git history
Static AnalysisSemgrep (secrets rules), grep patternsSource code secret scanning
Web Probingnuclei (exposure templates), ffufExposed file/config discovery
JS AnalysisSecretFinder, LinkFinderClient-side bundle secret extraction
Validationcurl, custom scriptsCredential active-access testing

References

  • references/tools.md - Tool function signatures and parameters
  • references/workflows.md - Attack pattern definitions and test vectors

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.