Skip to content

Commit 547f7b5

Browse files
authored
🔀 Merge pull request #53 from astariul/add_warning
Add warning in the README about supply chain attacks
2 parents a84c95b + 7677d0b commit 547f7b5

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

‎README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Make all your private packages accessible in one place<br>with this github-hoste
1212
<a href="#get-started">Get Started</a> •
1313
<a href="#modify-indexed-packages">Modify indexed packages</a> •
1414
<a href="#faq">FAQ</a> •
15+
<a href="#a-word-about-supply-chain-attacks">A word about supply chain attacks</a> •
1516
<a href="#contribute">Contribute</a> •
1617
<a href="#references">References</a>
1718
</p>
@@ -139,7 +140,9 @@ Then from `python`, you can just do :
139140
import tensorflow
140141
```
141142

142-
_Note : While it's possible to do like this, it's better to have a unique name for your package, to avoid confusion._
143+
---
144+
145+
**But be careful about this !** While it's possible to handle it like this, it's always better to have a unique name for your package, to avoid confusion but also for [security](#a-word-about-supply-chain-attacks) !
143146

144147
#### Q. How to download private package from Docker ?
145148

@@ -177,6 +180,21 @@ RUN --mount=type=secret,id=gh_auth,dst=/root/.netrc pip install <package_name> -
177180

178181
**_If you have any questions or ideas to improve this FAQ, please open a PR / blank issue !_**
179182

183+
## A word about supply chain attacks
184+
185+
As you saw earlier, this github-hosted PyPi index rely on the `pip` feature `--extra-index-url`. Because of how this feature works, it is vulnerable to supply chain attacks.
186+
187+
For example, let's say you have a package named `fbi_package` version `2.8.3` hosted on your private PyPi index.
188+
189+
An attacker could create a malicious package with the same name (`fbi_package`) and a higher version (for example `99.0.0`).
190+
When you run `pip install fbi_package --extra-index-url my_pypi_index.com`, under the hood `pip` will download the latest version of the package, which is the malicious package !
191+
192+
---
193+
194+
While this repository makes it very convenient to have your own PyPi index, be aware that the page is public, therefore anyone can see which package name you're using and create a malicious package with this same name...
195+
196+
Please be careful out there !
197+
180198
## Contribute
181199

182200
Issues and PR are welcome !

0 commit comments

Comments
 (0)