Air-Gapped Python Install: Offline Wheels and Hashes
A swapped package installed with no error. With hash checking on, it was refused.
Video #312 ยท Forward deployed engineer interviews
Steps in the video
Files
- install.py (32 lines)
- run.py (38 lines)
- wheelhouse.py (37 lines)
Tested with
Python 3.12.15 | pip==26.2.2
What this does not show
A simulated air gap (pip settings and a dead proxy; the proxy is never reached in this run), one small package with no dependencies, one laptop. The download step needs internet. Hash checking shows a file is the one you downloaded, not that it is safe.
Sources
Learning IT by Example.