Back to Skills

ghost-scan-secrets

Ghost Security - Secrets and credentials scanner. Scans codebase for leaked API keys, tokens, passwords, and sensitive data. Detects hardcoded secrets and generates findings with severity and remediation guidance. Use when the user asks to check for leaked secrets, scan for credentials, find hardcoded API keys or passwords, detect exposed .env values, or audit code for sensitive data exposure.

384stars26forksUpdated 6/4/2026

Security Assessment

Medium Risk(55/100)

Detected risks:

Remote Code Execution([agents/init/agent.md] curl -sfL https://raw.githubusercontent.com/ghostsecurity/poltergeist/main/scripts/install.sh | bash)
Sensitive File Access([SKILL.md] .env, [agents/analyze/analyzer.md] .env)
Security Score55/100

About ghost-scan-secrets

The ghost-scan-secrets skill is designed to help developers and security teams detect exposed sensitive information within their codebases. It identifies hardcoded API keys, passwords, tokens, and other credentials that could pose security risks if leaked. By automating the scanning process, this skill reduces the manual effort required to audit code for potential vulnerabilities, ensuring that secrets are caught early before they can be exploited. It addresses the common problem of inadvertent exposure of confidential information in repositories and development environments, which is a critical concern for organizations managing sensitive data.

The skill operates through a structured multi-step workflow, leveraging the Task tool to orchestrate subagents responsible for executing the actual scanning tasks. Key features include computing repository-specific output directories, initializing the poltergeist binary, scanning the codebase for secret candidates, analyzing those candidates, and summarizing findings with severity and remediation guidance. The skill produces organized outputs, such as candidate lists and final reports, and is designed to handle parallel analysis efficiently. Defaults for paths and versioning ensure consistent execution across various projects while allowing overrides for user-specified directories.

Typical use cases include auditing public and private repositories for accidental leaks, performing security checks before deployment, and maintaining compliance with internal and external data protection policies. Target users include developers, DevOps engineers, security analysts, and anyone responsible for safeguarding code and sensitive credentials. The skill is particularly valuable for teams using continuous integration pipelines or for security-focused organizations seeking proactive measures against secret exposure.

FAQ

How do I run a scan using ghost-scan-secrets?

You provide the path to the repository or codebase you want to scan. The skill computes default directories for outputs and orchestrates subagents to perform scanning, analysis, and reporting automatically.

Which types of sensitive data can this skill detect?

It detects hardcoded API keys, passwords, tokens, and exposed .env values, as well as other secrets that could be accidentally committed to a codebase.

Is ghost-scan-secrets compatible with non-git directories?

Yes, the skill defaults to using a date-based identifier when git metadata is not available, allowing scans on non-git directories.

What happens if no secret candidates are found?

If the candidate count is zero, the skill skips analysis and directly generates a summarized report with no findings.

Are there any specific installation requirements?

The skill installs the poltergeist binary automatically. Other than standard execution permissions and access to the repository directory, no additional setup is required.

All Files

9 files
agents/summarize/agent.md2.5 KB
View
SKILL.md4.6 KB
View
agents/analyze/template-finding.md1.6 KB
View
agents/summarize/template-report.md2.2 KB
View
agents/init/agent.md1.1 KB
View
agents/scan/agent.md3.0 KB
View
agents/analyze/agent.md2.6 KB
View
agents/analyze/analyzer.md5.4 KB
View
README.md2.7 KB
View

Install ghost-scan-secrets

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill