Skip to content

Commit 5f788cf

Browse files
committed
📝 Add link in the FAQ
1 parent 78ad08d commit 5f788cf

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ Then from `python`, you can just do :
140140
import tensorflow
141141
```
142142

143-
_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) !
144146

145147
#### Q. How to download private package from Docker ?
146148

@@ -180,15 +182,11 @@ RUN --mount=type=secret,id=gh_auth,dst=/root/.netrc pip install <package_name> -
180182

181183
## A word about supply chain attacks
182184

183-
In the past months, several companies were compromised through PyPi supply chain attacks. Because this repository is a PyPi index, this is very much spot on.
184-
185-
---
186-
187185
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.
188186

189187
For example, let's say you have a package named `fbi_package` version `2.8.3` hosted on your private PyPi index.
190188

191-
An attacker could create a malicious package with the same name (`fbi_package`) and a higher version (for example `99.0.0`). Then, when you run `pip install fbi_package --extra-index-url my_pypi_index.com`, `pip` will take the latest version of the package, which is the malicious package !
189+
An attacker could create a malicious package with the same name (`fbi_package`) and a higher version (for example `99.0.0`). 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 !
192190

193191
---
194192

0 commit comments

Comments
 (0)