fix(cve): add trust_env=True to honor HTTP_PROXY/HTTPS_PROXY environment variables#6601
Open
ttuuxxeerr wants to merge 1 commit into
Open
fix(cve): add trust_env=True to honor HTTP_PROXY/HTTPS_PROXY environment variables#6601ttuuxxeerr wants to merge 1 commit into
ttuuxxeerr wants to merge 1 commit into
Conversation
The CVE connector was ignoring HTTP_PROXY/HTTPS_PROXY environment variables because aiohttp.ClientSession defaults to trust_env=False. This fix allows the connector to work behind corporate proxies that require all outbound traffic through a proxy (e.g., Squid). Fixes connectivity issues for users behind corporate proxies where: - DNS resolution only works through the proxy - Direct outbound connections are blocked by firewall Related: aiohttp requires explicit proxy configuration or trust_env=True to honor environment variables.
Contributor License Agreement✅ CLA signed 💚 Thank you @ttuuxxeerr for signing the Contributor License Agreement! Your pull request can now be reviewed and merged. We appreciate your contribution to Filigran's open source projects! ❤️ This is an automated message from the Filigran CLA Bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
trust_env=Truetoaiohttp.ClientSession()inexternal-import/cve/src/services/client/api.pyto honorHTTP_PROXYandHTTPS_PROXYenvironment variablesRelated issues
Checklist
Further comments
This is a minimal one-line fix that addresses a critical connectivity issue for users behind corporate proxies.
Problem: The CVE connector was ignoring
HTTP_PROXYandHTTPS_PROXYenvironment variables when making requests to the NVD API.Root Cause:
aiohttp.ClientSessionwas created withouttrust_env=True.Solution: Added
trust_env=Trueto theClientSession()constructor.Testing: Verified that the connector now works behind a corporate Squid proxy.
Impact: Enables the CVE connector to work in corporate environments where all outbound traffic must go through a proxy.