Supply Chain Attack prevention tool
Project description
PipCanary
Supply Chain Attack Prevention Tool for Python Packages
PipCanary helps protect your Python projects from supply chain attacks by:
- Detecting suspicious filesystem behavior in package installation (e.g., access to SSH keys, sensitive directories, etc.)
- Enforcing a cool-down period on newly uploaded package versions, giving security researchers and scanners time to identify malicious releases
It acts as a safety layer on top of your existing dependency management workflow.
Features
- Behavioral analysis during package installation using
straceandbubblewrapsandboxing - Upload time checks warns about packages released too recently (default: 7 days)
- Simple CLI integration with
requirements.txtor other dependency files - Clear, actionable warnings and recommendations when risks are detected
Maturity
This project is in early development. While it already provides meaningful protection, expect occasional rough edges.
However, it's more secure than using plain pip, poetry, or uv without additional safeguards.
Requirements
- Linux
- Python 3.10 or higher
- bubblewrap (sandboxing tool)
- strace (file access tracking)
- pip
Installing dependencies on Ubuntu/Debian
sudo apt update
sudo apt install bubblewrap strace
pip install pipcanary
Installation
pipcanary -r requirements.txt
Usage
Basic Check
Scan a requirements.txt for potential supply chain risks:
pipcanary -r requirements.txt
Example Outputs
All packages look safe:
...
All packages appear to be safe!
Suspicious behaviour detected:
...
Found suspicious access to /root/.ssh in package evilpack
This could be dangerous!!!
Don't install this package under any circumstances until you know for sure that this is a false positive.
In doubt, contact the package maintainers!
Recently uploaded packages (cool-down warning):
...
Package click 8.3.2 was updated too recently: 2026-04-03T19:14:45.
It might be safer to use an older version.
Consider click<=8.3.1 or earlier and check for known vulnerabilities.
If you are certain that the latest version is safe, you can allow it with:
--allow-upload-time='click<=2026-04-03T19:14:45'
Similar Projects
Further Information on PyPi Suppy Chain Attacks
- How a Poisoned Security Scanner Became the Key to Backdooring LiteLLM
- The Team PCP Snowball Effect: A Quantitative Analysis
License
MIT License
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pipcanary-0.0.5.tar.gz.
File metadata
- Download URL: pipcanary-0.0.5.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0a74db5795505c6ffd4c4495c356e34b38c69d0b9ec837650749f334e115bc0
|
|
| MD5 |
6d0d6a45d2daba7c6e3497bde7b90697
|
|
| BLAKE2b-256 |
226adaf9ebdbeaeb725da2e4445a9db8870a88c1291546790f02096e3a33cd6f
|
File details
Details for the file pipcanary-0.0.5-py3-none-any.whl.
File metadata
- Download URL: pipcanary-0.0.5-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cfb8a1863da681ccfee2765b1bea651d88cc0ce9f9b9f4f5894524527b9108f
|
|
| MD5 |
92e031607ccfa07491b28000712b8f09
|
|
| BLAKE2b-256 |
96d71666e683c19a7411404f0bb63cde7126e65107fb7ebf6ed930fbc0b40790
|