Commit graph

63 commits

Author SHA1 Message Date
Uriel Corfa
cb9f3ee145
Do not rely on asynchronous import of child_process.
Importing child_process asynchronously causes loader errors when running the
binary dist:

$ ./dist/safe-chain python --safe-chain-logging=verbose
Safe-chain: Bypassing safe-chain for non-pip invocation: python
Failed to check for malicious packages: A dynamic import callback was not specified.
$

Relying on a regular import does not cause this issue. There is no obvious
reason for this import to be dynamic (in particular, there are no tests using
this to mock the spawn function), so let's simplify.
2025-12-12 09:09:52 +01:00
Uriel Corfa
db2c272aea
Add a unit test for shouldBypassSafeChain 2025-12-12 09:09:52 +01:00
Uriel Corfa
64d87ae1e1
Flush buffered logs before exiting 2025-12-12 09:09:50 +01:00
Reinier Criel
d9fe775d11 Fix some issues 2025-12-08 15:18:06 -08:00
Reinier Criel
e211f531c5 Refactor PyPI logic and cleanup 2025-12-04 12:37:59 -08:00
Reinier Criel
795e7af23e Clean up comments 2025-12-02 08:44:43 -08:00
Reinier Criel
a4f9f590a4 Don't modify config for config related commands 2025-12-02 08:31:47 -08:00
Reinier Criel
72bf44cb6d Fix linting issue 2025-11-21 10:31:57 -08:00
Reinier Criel
ab1aa0dce9 Little cleanup 2025-11-21 09:58:43 -08:00
Reinier Criel
0a0ac85542 Adapt per review 2025-11-21 09:41:07 -08:00
bitterpanda
f030b16adf
rm obvious comments 2025-11-21 13:33:33 +01:00
Reinier Criel
0e5b9b23f1 Fix tests 2025-11-17 10:18:47 -08:00
Reinier Criel
87fcb7239a Adapt per review 2025-11-17 10:03:38 -08:00
Reinier Criel
7039961d4c Bugfix 2025-11-13 15:50:37 -08:00
Reinier Criel
0b3cc1c175 Some more cleanup 2025-11-13 15:50:14 -08:00
Reinier Criel
4ee18973de Fix unit test 2025-11-13 12:48:04 -08:00
Reinier Criel
a0e24b1722 Update comments 2025-11-13 11:21:53 -08:00
Reinier Criel
61c9f1a1ef Merge config file if it exists 2025-11-13 11:14:45 -08:00
Reinier Criel
fbd11c6d44 Update 2025-11-12 14:01:06 -08:00
Reinier Criel
285906ea9d Update doc 2025-11-12 13:39:58 -08:00
Reinier Criel
f215368c4a Some small fixes 2025-11-12 13:30:22 -08:00
Reinier Criel
fdef9e0766 Some tweaks 2025-11-12 13:11:02 -08:00
Reinier Criel
f2bf5869ba Fix linting issue 2025-11-11 15:49:25 -08:00
Reinier Criel
a3d57cbd24 Cleanup 2025-11-11 15:24:59 -08:00
Reinier Criel
6bcd3d3b8f Make sure we don't override any environments 2025-11-11 15:22:06 -08:00
Reinier Criel
f9d241e474 Fix unused import 2025-11-11 14:32:12 -08:00
Reinier Criel
6a94271a10 Do not add list of trusted hosts, is security risk 2025-11-11 14:28:31 -08:00
Reinier Criel
9b102412af Add extra ENV vars 2025-11-11 10:37:39 -08:00
Reinier Criel
d3a4f81b3c More cleanup 2025-11-06 13:44:34 -08:00
Reinier Criel
61a53b24fd Some cleanup 2025-11-06 13:24:00 -08:00
Reinier Criel
a293c76ed9 Add better logging 2025-11-06 12:53:24 -08:00
Reinier Criel
e88aede939 Remove some debug logging 2025-11-06 12:25:55 -08:00
Reinier Criel
032fc3847f Fix args 2025-11-06 11:09:28 -08:00
Reinier Criel
28d24bb6ea Another iteration 2025-11-06 10:26:26 -08:00
Reinier Criel
87606def48 Fix comments 2025-11-05 09:18:18 -08:00
Reinier Criel
f0a3ae51db Only use mitm for pip packages 2025-11-05 08:34:40 -08:00
Reinier Criel
2b6b9b6737 Cleanup comments 2025-11-04 06:59:45 -08:00
Reinier Criel
f7e08bbea8 Fix more documentation issues 2025-11-03 10:44:12 -08:00
Reinier Criel
2accf954ca Fix more documentation issues 2025-11-03 10:20:05 -08:00
Reinier Criel
dadb1a3fba Adapt runPipCommand.js documentation 2025-11-03 09:55:39 -08:00
Reinier Criel
181470d764 Clean up 2025-11-03 09:49:06 -08:00
Reinier Criel
e65b857667 Adapt comments to align with other package managers 2025-11-03 09:47:16 -08:00
Reinier Criel
a2fb94d0f0 Fix type check issues 2025-11-03 07:13:36 -08:00
Reinier Criel
27ca2153b0 Fix warnings 2025-11-03 06:51:14 -08:00
Reinier Criel
c2a9cc2733 Move pipCaBundle to central location 2025-10-31 07:51:26 -07:00
Reinier Criel
d691c614ac Cleanup 2025-10-30 20:19:16 -07:00
Reinier Criel
f38a12c6d5 Combine certificates 2025-10-30 16:00:32 -07:00
Reinier Criel
1755fe829c Make test a little safer 2025-10-30 12:52:10 -07:00
Reinier Criel
8b7784ecc0 Omly pass --cert when using known registry 2025-10-30 12:36:32 -07:00
Reinier Criel
86ce7ac45e Remove unused var 2025-10-28 15:44:36 -07:00