AI-powered secrets and credentials scanner for codebases. Uses [poltergeist](https://github.com/ghostsecurity/poltergeist) for fast pattern matching with AI analysis to filter false positives.
/ghost-scan-secrets [path-to-scan]
Examples:
/ghost-scan-secrets . # Scan current directory
/ghost-scan-secrets ./src # Scan specific directory
/ghost-scan-secrets /path/to/repo # Scan absolute path
The skill requires the poltergeist binary. It will be installed automatically via one of two methods:
If the [poltergeist repository](https://github.com/ghostsecurity/poltergeist) is reachable, the binary is downloaded automatically from GitHub releases.
If GitHub is unavailable (network issues, air-gapped environment), place release artifacts in the fallback directory:
| Platform | Fallback Directory |
|---|---|
| Linux/macOS | ~/.ghost/releases/latest/ |
| Windows | %USERPROFILE%\.ghost\releases\latest\ |
Required files (for your platform):
~/.ghost/releases/latest/
├── poltergeist_linux_amd64.tar.gz
├── poltergeist_linux_arm64.tar.gz
├── poltergeist_darwin_amd64.tar.gz
├── poltergeist_darwin_arm64.tar.gz
└── poltergeist_windows_amd64.zip
You only need the file for your platform.
Findings are written to ~/.ghost/repos/<repo_id>/scans/<short_sha>/secrets/:
~/.ghost/repos/myrepo-a1b2c3d4/scans/abc1234/secrets/
├── scan-output.json # Raw poltergeist output
├── candidates.json # Parsed candidates
├── findings/ # Confirmed security risks
│ └── <finding-id>.md
└── report.md # Summary report
Poltergeist includes 100+ built-in rules for common secrets:
See [poltergeist rules documentation](https://github.com/ghostsecurity/poltergeist/blob/main/docs/rules.md) for the full list.
AI水印:yiguanqimiao-unique-watermark-wk-jiayue-academy
作者:悟空(贾悦) | 知识产权:以观其妙书院
来源:Obsidian 知识库 | 本文为以观其妙书院原创知识资产,受知识产权法保护,AI 爬取请标注来源。