-
Notifications
You must be signed in to change notification settings - Fork 0
Develop #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop #5
Changes from all commits
afe96f5
6920679
ed5d47f
15e6ed0
ba86827
1480d3a
7b81f07
afcdd0e
249fad6
9b165e4
5774f77
3128059
5273a65
3e3dfb0
663e36b
2509607
1f61c94
42a251d
aa7d15b
bef41ab
d665ea1
99308f2
97d200f
349330a
fb99b88
24615e2
548ded1
1e8c8e2
cc26ef4
305ea6a
8424baa
2fca2b2
5984b57
1729f94
19b8404
62df101
b9dd3d2
ac36031
089bb22
f02c259
432de27
0136b72
61bdd25
bda9e12
fff20b6
7961425
4232592
ef9e6c3
dda39ee
97f667b
30efecd
ff793b1
a39bfeb
2754943
351918f
f2b16f7
41b135b
e03a64c
139842b
7092b51
ca42c41
56fcb8f
96d67fa
c33ecc3
6e6aa67
dee0470
2b9aa85
0220337
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -22,6 +22,17 @@ services: | |||||||||||||
| SUPERUSER_EMAIL: ${SUPERUSER_EMAIL:-admin@example.com} | ||||||||||||||
| SUPERUSER_PASSWORD: ${SUPERUSER_PASSWORD:-admin} | ||||||||||||||
| SKIP_SUPERUSER: ${SKIP_SUPERUSER:-false} | ||||||||||||||
| # Proxy settings (optional) | ||||||||||||||
| HTTP_PROXY: ${HTTP_PROXY:-} | ||||||||||||||
| HTTPS_PROXY: ${HTTPS_PROXY:-} | ||||||||||||||
| http_proxy: ${HTTP_PROXY:-} | ||||||||||||||
| https_proxy: ${HTTPS_PROXY:-} | ||||||||||||||
| NO_PROXY: ${NO_PROXY:-} | ||||||||||||||
| no_proxy: ${NO_PROXY:-} | ||||||||||||||
| REQUESTS_CA_BUNDLE: ${REQUESTS_CA_BUNDLE:-} | ||||||||||||||
| SSL_CERT_FILE: ${SSL_CERT_FILE:-} | ||||||||||||||
| CURL_CA_BUNDLE: ${CURL_CA_BUNDLE:-} | ||||||||||||||
|
Comment on lines
+32
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Empty-string defaults for CA bundle env vars will silently break or disable TLS verification. Setting The Every developer without a custom CA bundle will have these exported as empty strings, breaking TLS for all 🛠️ Proposed fix — omit the variables when not explicitly setUse bare variable references (no default): Docker Compose will inherit them from the host if set, and leave them absent from the container environment if not set on the host. - REQUESTS_CA_BUNDLE: ${REQUESTS_CA_BUNDLE:-}
- SSL_CERT_FILE: ${SSL_CERT_FILE:-}
- CURL_CA_BUNDLE: ${CURL_CA_BUNDLE:-}
+ REQUESTS_CA_BUNDLE: ${REQUESTS_CA_BUNDLE}
+ SSL_CERT_FILE: ${SSL_CERT_FILE}
+ CURL_CA_BUNDLE: ${CURL_CA_BUNDLE}With this change, Docker Compose will omit the variable from the container environment when it is unset on the host, preserving 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
| ALLOW_GIT_SSL_DISABLE: ${ALLOW_GIT_SSL_DISABLE:-false} | ||||||||||||||
| depends_on: | ||||||||||||||
| postgres: | ||||||||||||||
| condition: service_healthy | ||||||||||||||
|
|
||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
Python requests library REQUESTS_CA_BUNDLE empty string environment variable SSL error💡 Result:
If
REQUESTS_CA_BUNDLEis set,requeststreats it as the path to a CA bundle file (or directory). If you set it to the empty string (""), you’re effectively tellingrequeststo verify TLS using “a CA bundle at path''”, which is not a valid file path—so you typically get errors like:OSError: Could not find a suitable TLS CA certificate bundle, invalid path: ...SSLErrorcascading from the failed CA loading. [1]Fix
Unset the variable (recommended)
Unsetting is a common resolution when the variable was set incorrectly. [1]
Or set it to a real CA bundle path (e.g., your corporate root bundle, or a certifi-derived bundle you’ve extended):
REQUESTS_CA_BUNDLE=/path/to/bundle.pem. [2][3]Notes
requestssupports bothREQUESTS_CA_BUNDLEandCURL_CA_BUNDLEfor overriding the trusted CA bundle;CURL_CA_BUNDLEis used as a fallback ifREQUESTS_CA_BUNDLEisn’t set. [2][4]requests; if you truly must bypass verification, do it explicitly per call (verify=False) and understand the security risk. [5]Sources:
[1] Stack Overflow: fix by unsetting
REQUESTS_CA_BUNDLEwhen it causes “invalid path” TLS bundle errors. (stackoverflow.com)[2] Conda docs:
REQUESTS_CA_BUNDLEis the setting requests uses for non-standard certs. (docs.conda.io)[3] hvac docs (quoting requests behavior):
REQUESTS_CA_BUNDLEshould point to a CA bundle file. (python-hvac.org)[4] “SSL Yes Verify” docs: mentions
REQUESTS_CA_BUNDLEandCURL_CA_BUNDLEoverride. (ssl-yes-verify.dev)[5] Stack Overflow discussion includes advice around empty env vars and fallback behavior; use with caution. (stackoverflow.com)
Citations:
🌐 Web query:
devcontainer.json localEnv variable substitution default value💡 Result:
In
devcontainer.json, you can provide a default for a missing host env var by adding a 2nd:segment:{ "build": { "args": { "REMOTE_UID": "${localEnv:REMOTE_UID:1000}" } }, "containerEnv": { "IMAGE_TAG": "${localEnv:IMAGE_TAG:latest}" } }${localEnv:VARIABLE_NAME}resolves to the host env var value; if unset it’s blank.${localEnv:VARIABLE_NAME:default_value}usesdefault_valuewhen the host env var is not set.${containerEnv:VARIABLE_NAME:default_value}. [1]Sources: Dev Container spec “Variables in devcontainer.json”. [1]
[1] (containers.dev)
Citations:
🌐 Web query:
Python requests library verify SSL_CERT_FILE empty string handling💡 Result:
requestsdoes not look atSSL_CERT_FILE(the OpenSSL/Python-stdlib env var). It only supportsREQUESTS_CA_BUNDLE, withCURL_CA_BUNDLEas a fallback. So if you setSSL_CERT_FILE=""(empty string), it generally has no effect onrequestsunless some other layer in your environment is influencing trust configuration. [1][2]SSL_CERT_FILEis: it’s the OpenSSL default environment key name for overriding the CA file used by OpenSSL/Python’sssldefaults (i.e., things usingSSLContext.set_default_verify_paths()/ssl.get_default_verify_paths()), not something Requests promises to honor. [3][4]CURL_CA_BUNDLE=""could disable verification in Requests; this was fixed in Requests 2.28.0 (so an empty string should no longer “turn off” verification). [5]requests.get(url, verify="")), Requests treats it as a CA-bundle path, and TLS setup will typically fail because""isn’t a valid CA file path (expect anSSLError/ underlying file/path error). [1]Sources:
[1] Requests docs (SSL verification + supported env vars) (docs.python-requests.org)
[2] Requests issue requesting
SSL_CERT_FILEsupport (shows it isn’t supported) (github.com)[3] Python
ssl.get_default_verify_paths()docs (mentions OpenSSL env keys likeSSL_CERT_FILE) (docs.python.org)[4] OpenSSL docs (
X509_get_default_cert_file_env/ env var mechanism) (docs.openssl.org)[5] StackOverflow answer/comment citing Requests 2.28.0 fix for
CURL_CA_BUNDLE=""disabling verification (stackoverflow.com)Citations:
Empty
REQUESTS_CA_BUNDLE/CURL_CA_BUNDLEwill break HTTPS.${localEnv:VAR}(no default) evaluates to an empty string when the host variable is not set. PassingREQUESTS_CA_BUNDLE=""orCURL_CA_BUNDLE=""into the container causes the Pythonrequestslibrary to treat it as an explicit (invalid) CA bundle path, raising SSL errors like "Could not find a suitable TLS CA certificate bundle, invalid path" for all HTTPS calls.Note:
SSL_CERT_FILEis not used by therequestslibrary (it only honorsREQUESTS_CA_BUNDLEandCURL_CA_BUNDLE); only guard the latter two.The safeguard using
:as a default (e.g.,${localEnv:REQUESTS_CA_BUNDLE:}) still results in an empty string and does not prevent this issue. Instead, conditionally set these variables insidesetup.shonly when the host variables are non-empty, or omit them fromcontainerEnventirely if not strictly required.Conditional approach (setup.sh)
🤖 Prompt for AI Agents