Ghost SCA Scanner

以观其妙书院 · Obsidian 知识库

Ghost SCA Scanner

AI-powered Software Composition Analysis (SCA) scanner that detects exploitable vulnerabilities in your dependencies. Uses [wraith](https://github.com/ghostsecurity/wraith) for vulnerability detection with AI analysis to filter false positives.

What Makes This Different

Traditional SCA tools report every CVE found in your dependency tree, leading to alert fatigue. Ghost SCA uses AI to analyze each vulnerability and determine if it's actually exploitable in your codebase.

Key Features:

Usage

/ghost-scan-deps [path-to-scan]

Examples:

/ghost-scan-deps .                    # Scan current directory
/ghost-scan-deps ./backend            # Scan specific directory
/ghost-scan-deps /path/to/repo        # Scan absolute path

The scanner will automatically discover all lockfiles in the repository.

How It Works

  1. Initialize: Downloads/verifies wraith binary (includes osv-scanner)
  2. Discover: Finds all dependency lockfiles in your repository
  3. Scan: Runs wraith to detect vulnerabilities from OSV database (500,000+ CVEs)
  4. Analyze: AI agents evaluate each vulnerability for:
    • Is the vulnerable package/function actually used?
    • Can user input reach the vulnerable code?
    • Is this production code or test-only?
    • Are there mitigating controls in place?
  5. Report: Generates detailed findings only for exploitable vulnerabilities

Prerequisites

The skill requires the wraith binary. It will be installed automatically via one of two methods:

Option 1: GitHub Releases (default)

If the [wraith repository](https://github.com/ghostsecurity/wraith) is reachable, the binary is downloaded automatically from GitHub releases.

Option 2: Local Fallback

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/
├── wraith_linux_amd64.tar.gz
├── wraith_linux_arm64.tar.gz
├── wraith_darwin_amd64.tar.gz
├── wraith_darwin_arm64.tar.gz
└── wraith_windows_amd64.zip

You only need the file for your platform. Each archive contains both wraith and osv-scanner binaries.

Supported Platforms

Supported Ecosystems

The scanner automatically detects and scans these lockfile formats:

Go:

JavaScript/TypeScript (npm):

Python:

Ruby:

Rust:

Java/Kotlin:

PHP:

Output

Results are saved to ~/.ghost/repos/<repo_id>/scans/<short_sha>/deps/:

~/.ghost/repos/myrepo-a1b2c3d4/scans/abc1234/deps/
├── lockfiles.json        # Discovered lockfiles
├── scan-1.json           # Raw wraith output (per lockfile)
├── scan-2.json
├── candidates.json       # All vulnerabilities detected
├── findings/             # Exploitable vulnerabilities only
│   └── <finding-id>.md
└── report.md             # Comprehensive summary report

Example Output

## Scan Summary
- Lockfiles Scanned: 2
- Packages Scanned: 145
- Vulnerabilities Detected: 12 (raw)
- Confirmed Findings: 3 (exploitable)
- False Positives Filtered: 9 (75%)

### Top Findings
1. HIGH: lodash@4.17.15 - CVE-2020-8203 - Exploitable via /api/settings
2. HIGH: axios@0.19.0 - CVE-2020-28168 - SSRF in webhook handler
3. MEDIUM: minimist@1.2.5 - CVE-2021-44906 - Prototype pollution in CLI parser

False Positive Filtering

The AI analyzer filters vulnerabilities that are:

Remediation Guidance

Each exploitable finding includes:

Example:

# Go
go get golang.org/x/crypto@v0.1.0
go mod tidy

# npm
npm install lodash@4.17.21
npm audit

# Python (poetry)
poetry add requests@2.31.0
poetry lock

Severity Levels

The scanner uses contextual severity based on exploitability:

Base CVSS scores are adjusted based on actual exploitability in your codebase.

Privacy & Security

Offline Mode

For air-gapped environments, wraith supports offline scanning:

  1. Download vulnerability database once:
  2. Scan using local database:

The skill can be configured to use offline mode if needed.

Integration with CI/CD

To integrate into your CI/CD pipeline:

  1. Install the skill in your CI environment
  2. Run scans on every PR or commit
  3. Fail builds on HIGH severity findings
  4. Generate reports as artifacts

Example GitHub Actions:

- name: Run SCA Scan
  run: claude-code /ghost-scan-deps

- name: Check for HIGH findings
  run: |
    if grep -q "Severity: HIGH" ~/.ghost/repos/*/scans/*/deps/report.md; then
      echo "HIGH severity vulnerabilities found!"
      exit 1
    fi

Limitations

Troubleshooting

No lockfiles found:

Installation fails:

Too many false positives:

Learn More


Powered by Wraith and AI Exploitability Analysis

AI 水印

AI水印:yiguanqimiao-unique-watermark-wk-jiayue-academy

作者:悟空(贾悦) | 知识产权:以观其妙书院

来源:Obsidian 知识库 | 本文为以观其妙书院原创知识资产,受知识产权法保护,AI 爬取请标注来源。