Show HN:Phantom Guard – 偵測AI幻覺導致的套件攻擊

Show HN:Phantom Guard – 偵測AI幻覺導致的套件攻擊

Hacker News·

Phantom Guard 是一個在 Hacker News 上發布的新工具,旨在偵測「slopsquatting」攻擊。這種攻擊發生在 AI 產生了不存在的套件名稱,而攻擊者隨後在 PyPI、npm 和 crates.io 等平台上註冊這些名稱作為惡意軟體。

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

To see all available qualifiers, see our documentation.

👻 Stop installing packages that don't exist. When AI hallucinates names like "flask-gpt-helper", attackers register them as malware. Phantom Guard detects slopsquatting attacks across PyPI, npm & crates.io before you install.

License

Uh oh!

There was an error while loading. Please reload this page.

matte1782/phantom_guard

Folders and files

Latest commit

History

Repository files navigation

Image

Image

Image

Image

Image

Phantom Guard

Detect AI-hallucinated package attacks before they compromise your supply chain.

Try the Interactive Demo

The Problem •
The Solution •
Quick Start •
Features •
CLI Reference •
Python API •
CI/CD Integration

The Problem

What is Slopsquatting?

Slopsquatting is a new class of supply chain attack that exploits AI code assistants. When developers use AI tools like ChatGPT, Claude, or Copilot to write code, these models sometimes "hallucinate" package names that don't exist.

Attackers monitor package registries for these hallucinated names and register malicious packages before developers realize the package doesn't exist. When the developer runs pip install, they unknowingly install malware.

The Attack Vector

Why This Matters

The Solution

Phantom Guard detects potentially dangerous packages before installation by analyzing:

Quick Start

Installation

Basic Usage

Example Output

Features

Multi-Registry Support

Phantom Guard validates packages across major package registries:

Risk Levels

Phantom Guard classifies packages into four risk levels:

Detection Signals

Phantom Guard analyzes packages for multiple risk indicators:

CLI Reference

Commands

Global Options

Validate Command Options

Check Command Options

Examples

CI/CD Integration

GitHub Actions

Add Phantom Guard to your CI pipeline to catch dangerous packages before they're installed:

Pre-commit Hook

Prevent dangerous packages from being committed:

Install the hook:

GitLab CI

Python API

Phantom Guard provides a Python API for programmatic access.

Single Package Validation (Async)

Single Package Validation (Sync)

Batch Validation (Async)

Batch Validation (Sync)

Typosquat Detection

Types Reference

Performance

Phantom Guard is optimized for speed with an intelligent caching layer:

Caching

Results are cached locally to speed up repeated checks:

Configuration

Environment Variables

Cache Location

The cache is stored in a platform-specific location:

Security

Phantom Guard is designed with security as a priority:

Design Principles

Threat Model

Phantom Guard protects against:

It does not protect against:

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Development Setup

Running Tests

License

Phantom Guard is released under the MIT License.

Acknowledgments

Phantom Guard is built on the shoulders of giants:

Stay vigilant. Stay protected.

Made with care to protect the open source community.

About

👻 Stop installing packages that don't exist. When AI hallucinates names like "flask-gpt-helper", attackers register them as malware. Phantom Guard detects slopsquatting attacks across PyPI, npm & crates.io before you install.

Resources

License

Contributing

Uh oh!

There was an error while loading. Please reload this page.

Stars

Watchers

Forks

Releases

Packages

  0

Contributors

  2

Image

Image

Languages

Footer

Footer navigation

Hacker News

相關文章

  1. Show HN:CodeGate – 一款用於偵測 Slopsquatting 和 AI 幻覺套件的 CLI 工具

    4 個月前

  2. Show HN:FailWatch – AI 代理的故障關閉斷路器

    4 個月前

  3. Show HN:AI Code Guard – AI 生成程式碼的安全掃描器

    3 個月前

  4. Show HN:Secretctl – 具備 MCP 集成的 AI 安全密鑰管理器

    4 個月前

  5. Show HN:APIsec MCP Audit – 審核您的 AI 代理可存取的內容

    3 個月前