reference Environment variables

NO_PROXY

Also spelled
no_proxy
Value
a comma-separated list of host names or domain suffixes, or *
See also
HTTPS_PROXY

The hosts that are reached directly, without the proxy set by HTTPS_PROXY, HTTP_PROXY or ALL_PROXY. Entries are separated by commas; spaces around them are ignored.

An entry matches the host itself and every host under it: example.com, .example.com and com all match rules.example.com, and example.com does not match notexample.com. Ports are not part of the match, so an entry such as example.com:443 matches no host. * matches every host.

The lowercase no_proxy is also read; when both are set, NO_PROXY takes precedence. The variable has no OPENGREP_ form.

Examples

One host that bypasses the proxy

The host proxy.invalid does not exist, so a download through the proxy fails when Opengrep resolves the proxy.

app.py
eval(1)
Command and result
$ HTTPS_PROXY=http://proxy.invalid:3128 opengrep scan --config https://example.invalid/rules.yaml app.py 2>&1 | grep 'Failed to download'
error    Failed to download config from https://example.invalid/rules.yaml: Failure: resolution failed: name resolution failed
$ HTTPS_PROXY=http://proxy.invalid:3128 NO_PROXY=example.invalid opengrep scan --config https://example.invalid/rules.yaml app.py 2>&1 | grep 'Failed to download'
error    Failed to download config from https://example.invalid/rules.yaml: Failure: TLS to non-TCP currently unsupported: host=example.invalid endp=(Unknown "name resolution failed")
$ HTTPS_PROXY=http://proxy.invalid:3128 NO_PROXY=other.invalid opengrep scan --config https://example.invalid/rules.yaml app.py 2>&1 | grep 'Failed to download'
error    Failed to download config from https://example.invalid/rules.yaml: Failure: resolution failed: name resolution failed

Only the second download skips the proxy and goes to example.invalid.