Skip to main content

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.

Metadata

Release files for pipguard-security 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pipguard-security 0.3.0
File Size Uploaded
pipguard_security-0.3.0.tar.gz 21.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pipguard-security 0.3.0
File Interpreter ABI Platform
pipguard_security-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 48.7 kB

Release files / pipguard_security-0.3.0.tar.gz

Download URL pipguard_security-0.3.0.tar.gz
Size 21.8 kB
Tags Source
SHA-256 checksum
How to use checksums
387cc969298a29b88d8d057b314d9cc18b7644f96ee794b65d7e6b3cc58df4b8
BLAKE2b-256 checksum
How to use checksums
c2192ac7e5807ab9cadc7be3d37d81deb0ef3c9dd62a7cfa2676472d661ea1f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.0 CPython/3.14.4 Darwin/24.6.0

Release files / pipguard_security-0.3.0-py3-none-any.whl

Download URL pipguard_security-0.3.0-py3-none-any.whl
Size 26.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7dbae3e57d3625012c30f46311b68067e97852fa7b0a4e131d58e7c7bf7b8631
BLAKE2b-256 checksum
How to use checksums
9c711fe5b31cbe79ed252130c21763aecdfb850d1fd52c637de2049c6e7cc61d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.0 CPython/3.14.4 Darwin/24.6.0

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page