You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<ahref="#a-word-about-supply-chain-attacks">A word about supply chain attacks</a> •
15
16
<ahref="#contribute">Contribute</a> •
16
17
<ahref="#references">References</a>
17
18
</p>
@@ -139,7 +140,9 @@ Then from `python`, you can just do :
139
140
import tensorflow
140
141
```
141
142
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) !
143
146
144
147
#### Q. How to download private package from Docker ?
145
148
@@ -177,6 +180,21 @@ RUN --mount=type=secret,id=gh_auth,dst=/root/.netrc pip install <package_name> -
177
180
178
181
**_If you have any questions or ideas to improve this FAQ, please open a PR / blank issue !_**
179
182
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...
0 commit comments