CodeVetter · Repo Unpack · Risk map
pypa/pip
These are source observations and one explicitly labeled failure hypothesis, not confirmed vulnerabilities. Sensitive boundaries include TLS policy, credential retrieval, subprocess execution, and installation outside the checkout. Existing containment checks and hash checks are meaningful protections, but their scope must be preserved. Build-dependency policy and per-package mutation deserve particular attention because they differ from assumptions users may make about the parent install.
- Trusted-host adapters intentionally call certificate verification with verify=False and may cache those responses; ordinary HTTPS uses the secure adapter. Changes to host matching or adapter mounting affect transport trust and cache contents.
- Authentication retrieves URL/index credentials and netrc data, strips credentials from request URLs, and adds Basic Auth; 401 handling can recover redirected URL credentials, consult keyring, prompt, and resend the request.
- config edit executes a shell command built from --editor, VISUAL, or EDITOR and a quoted configuration filename; the implementation rejects filenames containing a double quote but deliberately retains shell semantics for the editor command.
- Wheel installation writes into purelib/platlib and scheme-specific destinations, enforcing archive-path containment and entry-point-name containment before writing files or generating launchers.
- Hash-required preparation rejects VCS URLs, existing directories, and unpinned nondirect requirements, and disables metadata-only fetching; cached built wheels are accepted against recorded source hashes rather than wheel hashes.
- InprocessBuildEnvironmentInstaller hard-codes require_hashes=False and records that build-dependency hash checking is deferred; it also documents imperfect interaction with venv-based build environments.
- Build metadata invokes configured project backend hooks, and VCS operations execute external commands; call_subprocess() copies the process environment, applies explicit additions/removals, and launches arguments through Popen.
- Failure hypothesis: an interrupted config save could truncate its INI file, and a later package failure could leave earlier packages changed. Configuration uses direct write mode, while installation rollback is scoped to the current requirement's previous uninstall. (inferred)