Skip to main content

A security tool to prevent accidental installation of malicious AI-generated packages

Project description

PipGuard

A security tool to prevent accidental installation of malicious AI-generated packages.

Problem

AI coding assistants (ChatGPT, Claude, Copilot) sometimes invent nonexistent Python packages. Developers might unknowingly run pip install on these hallucinated names, installing malware or typosquat packages that can compromise development environments.

Solution

PipGuard intercepts package installations and provides real-time risk assessment:

  • Typosquatting detection - Identifies packages mimicking popular libraries
  • Malicious package database - Checks against known malicious packages from OSV, GitHub Advisory Database
  • Suspicious pattern detection - Flags new packages with low download counts, obfuscated code
  • Warn-by-default approach - Never blocks workflows, builds trust through informative warnings

Installation

pip install pipguard

Usage

# Install a package with safety check
pipguard install requests

# Scan requirements file
pipguard scan requirements.txt

# Audit current environment
pipguard audit .

Risk Assessment

PipGuard analyzes packages for:

  • HIGH: Known malicious packages or clear typosquats
  • MEDIUM: Suspicious patterns (new package, low downloads, suspicious metadata)
  • LOW: Minor concerns worth noting

Example warning:

⚠️  Suspicious package detected: "reqeusts"
Reasons:
- Similar to popular package "requests"
- Published 2 days ago
- Low download count
Risk score: HIGH

Continue anyway? (y/N)

Data Sources

License

MIT License - see LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pipguard_security-0.1.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pipguard_security-0.1.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file pipguard_security-0.1.0.tar.gz.

File metadata

  • Download URL: pipguard_security-0.1.0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.0 CPython/3.14.4 Darwin/24.6.0

File hashes

Hashes for pipguard_security-0.1.0.tar.gz
Algorithm Hash digest
SHA256 52e699d7cfb925aa27b528a9c5f5a6455167ed782222629569e062f1754538a9
MD5 dd3803a5dca65309e780a1a1ab461161
BLAKE2b-256 efd695404391ffee84c1d5c7f3ce2ff55a91ba1c30257dea75635ae561e8f3b0

See more details on using hashes here.

File details

Details for the file pipguard_security-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pipguard_security-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.0 CPython/3.14.4 Darwin/24.6.0

File hashes

Hashes for pipguard_security-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ec1785ffda2b2ea5a2225471f4da1150a5b8b6bce3dbfb1bd8818e5c86a0487e
MD5 5308148b24d135191c10c1189e8d2aef
BLAKE2b-256 0980632e2fae2266e600ca0fb887e4f2c4fe15ebb08fd37a806f4e18fd650322

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page