mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Cleanup
This commit is contained in:
parent
c9e7bd2ab4
commit
d691c614ac
1 changed files with 3 additions and 5 deletions
|
|
@ -2,16 +2,14 @@ import { ui } from "../../environment/userInteraction.js";
|
||||||
import { safeSpawn } from "../../utils/safeSpawn.js";
|
import { safeSpawn } from "../../utils/safeSpawn.js";
|
||||||
import { mergeSafeChainProxyEnvironmentVariables } from "../../registryProxy/registryProxy.js";
|
import { mergeSafeChainProxyEnvironmentVariables } from "../../registryProxy/registryProxy.js";
|
||||||
import { getCombinedCaBundlePath } from "./utils/pipCaBundle.js";
|
import { getCombinedCaBundlePath } from "./utils/pipCaBundle.js";
|
||||||
// Always provide Python with a complete CA bundle (Safe Chain CA + Mozilla + Node built-in roots)
|
|
||||||
// so that any network request made by pip, including those outside explicit CLI args,
|
|
||||||
// validates correctly under both MITM'd and tunneled HTTPS.
|
|
||||||
|
|
||||||
export async function runPip(command, args) {
|
export async function runPip(command, args) {
|
||||||
try {
|
try {
|
||||||
const env = mergeSafeChainProxyEnvironmentVariables(process.env);
|
const env = mergeSafeChainProxyEnvironmentVariables(process.env);
|
||||||
|
|
||||||
// Always set Python CA env vars to a combined bundle that includes Safe Chain CA,
|
// Always provide Python with a complete CA bundle (Safe Chain CA + Mozilla + Node built-in roots)
|
||||||
// Mozilla roots (certifi), and Node built-in root CAs.
|
// so that any network request made by pip, including those outside explicit CLI args,
|
||||||
|
// validates correctly under both MITM'd and tunneled HTTPS.
|
||||||
const combinedCaPath = getCombinedCaBundlePath();
|
const combinedCaPath = getCombinedCaBundlePath();
|
||||||
env.REQUESTS_CA_BUNDLE = combinedCaPath;
|
env.REQUESTS_CA_BUNDLE = combinedCaPath;
|
||||||
env.SSL_CERT_FILE = combinedCaPath;
|
env.SSL_CERT_FILE = combinedCaPath;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue