A defensive pip wrapper with supply-chain preflight checks.
Project description
Not Finished Yet. Contribution Welcome. Site at https://spip.lamentxu.top/
secured_pip
An open-source, free guard for your pip to avoid supply-chain attacks.
By using this, you can avoid being screwed by the poisoned LiteLLM, etc. just because you type pip install
What?
Currently, supply chain attacks are one of the major security concerns all over the world. The secured_pip project is a future pip wrapper focused on supply-chain risk controls.
Wait, What?
You can use
spip install requests
Instead of
pip install requests
To install a package more safely in the scope of supply chain security.
You do not need to configure. You do not need to learn. Just pure install-to-master.
In other words, you can completely replace pip install with spip install to make your installation safer :)
If you want a near drop-in experience, you can set a shell alias from pip to spip.
PowerShell (Windows):
if (!(Test-Path $PROFILE)) { New-Item -Type File -Path $PROFILE -Force }
Add-Content $PROFILE 'function pip { spip @args }'
. $PROFILE
Bash (Linux):
echo "alias pip='spip'" >> ~/.bashrc
source ~/.bashrc
Zsh (macOS):
echo "alias pip='spip'" >> ~/.zshrc
source ~/.zshrc
The secured_pip project will actively check for all the supply chain risks and avoid you installing potentially malicious packages when typing spip install
Except for the install commands, the project behaves exactly the same as the original pip program. That is, you can always use spip instead of pip in any case :)
Current minimum Python version: 3.10
We currently have three install warning policies:
HIGH: pause installation and require--ignore-warningMEDIUM: prompty/nbefore continuingLOW: warn and continue
When spip detects a potential risk, a warning will be raised, with the level depending on the severity the risk is.
For now, the project has several major check points:
- Fake typo checks: Hackers often use "fake typos" to inject a malicious dependency package into the poisoned source file.
spipdetects this by first resolving all the packages thatpip installis going to download, and then comparing non-popular resolved package names with a local hot-package list. Warning levels:- Medium severity:
requsetsvsrequests - Medium severity:
pandazvspandas - Low severity:
sixthvssix
- Medium severity:
- Fresh release checks: If the selected PyPI release was published less than 2 days ago,
spipwill raise aMEDIUMwarning. - Zero-version checks: If the selected package version is
0.0or0.0.0,spipwill raise aLOWwarning. -
.pthfile detection: Instead of directly injecting malicious code inside the package, today most hackers will place their bad stuff under a.pthfile, with animportas the beginning.spiponly checks the installed file-system diff after installation. The warning level is alwaysMEDIUM, andspipwill ask whether to delete the suspicious installed.pthfile. - TODO ...
Project details
Release history Release notifications | RSS feed
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 secured_pip-0.2.0.tar.gz.
File metadata
- Download URL: secured_pip-0.2.0.tar.gz
- Upload date:
- Size: 41.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0b2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be2e7a30535e843c81f363a6f59fcb7dab92fe89768e69b6115b006ae49755eb
|
|
| MD5 |
cab6d457aa96614c828b9eb9fac3afdb
|
|
| BLAKE2b-256 |
84cb7cbe2bf7d38b76428de706b2859448c046c2e33d97205bb2464ee03b73f2
|
File details
Details for the file secured_pip-0.2.0-py3-none-any.whl.
File metadata
- Download URL: secured_pip-0.2.0-py3-none-any.whl
- Upload date:
- Size: 35.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0b2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee2c7d09cb0a6a04789f011a3addc8fe420da42ec1be88dea5def9c181883e83
|
|
| MD5 |
b220b8c6e5966c846350f54f290846c6
|
|
| BLAKE2b-256 |
ec0b7ec47004f458d219ee57d5169ba39a4f0d42f6f62ee08caefb51ee83bcff
|