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.2.tar.gz (9.7 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.2-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pipguard_security-0.1.2.tar.gz
  • Upload date:
  • Size: 9.7 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.2.tar.gz
Algorithm Hash digest
SHA256 5b48893343ff8584495deddde036068dcf95eee4b98530d9a1d1c1c650844a3e
MD5 0ed6340323683c5d5959afbd946ceb65
BLAKE2b-256 08857c1e4cb5e01f108ed772dee75b66bacd9ddd605e4ca48326e85962a4ebd0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pipguard_security-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.7 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5027d7da66c5c17d6593c0711e0e5975408af622b57eca2020f6c2286ef5534f
MD5 d1f01b3669c0916c8f9a5706af6dea8d
BLAKE2b-256 167f682d2abe89bbfab4cbab15a6f9738b7e9fd72acaa1ff26e317565c31e0fa

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