Add proxy support for pypi package managers (#150)

* initial pypi registry implementation

* support proxy mode for pypi package managers

* support proxy mode for pypi package managers - 2

* rm default mode as proxy for pip3

* update goproxy version & fix pypi proxy failing on 304

* add PIP_RETRIES=0 env

* update pmg e2e & add proxy mode e2e for pypi

* rm safedep-test-pkg for pypi proxy e2e
This commit is contained in:
Sahil Bansal
2026-02-05 13:30:27 +05:30
committed by GitHub
parent 3778d4d1f3
commit f1891271c1
13 changed files with 1272 additions and 81 deletions
+9
View File
@@ -43,6 +43,14 @@ func (f *InterceptorFactory) CreateInterceptor(ecosystem packagev1.Ecosystem) (p
f.confirmationChan,
), nil
case packagev1.Ecosystem_ECOSYSTEM_PYPI:
return NewPypiRegistryInterceptor(
f.analyzer,
f.cache,
f.statsCollector,
f.confirmationChan,
), nil
default:
return nil, fmt.Errorf("proxy-based interception not yet supported for ecosystem: %s", ecosystem.String())
}
@@ -52,6 +60,7 @@ func (f *InterceptorFactory) CreateInterceptor(ecosystem packagev1.Ecosystem) (p
func SupportedEcosystems() []packagev1.Ecosystem {
return []packagev1.Ecosystem{
packagev1.Ecosystem_ECOSYSTEM_NPM,
packagev1.Ecosystem_ECOSYSTEM_PYPI,
}
}