| 1086 | """L7-T5: Sandbox CA is injected into trust store environment variables.""" |
| 1087 | |
| 1088 | def check_ca_env() -> str: |
| 1089 | import json as _json |
| 1090 | import os |
| 1091 | |
| 1092 | return _json.dumps( |
| 1093 | { |
| 1094 | "SSL_CERT_FILE": os.environ.get("SSL_CERT_FILE", ""), |
| 1095 | "NODE_EXTRA_CA_CERTS": os.environ.get("NODE_EXTRA_CA_CERTS", ""), |
| 1096 | "REQUESTS_CA_BUNDLE": os.environ.get("REQUESTS_CA_BUNDLE", ""), |
| 1097 | "CURL_CA_BUNDLE": os.environ.get("CURL_CA_BUNDLE", ""), |
| 1098 | "ca_cert_exists": os.path.exists("/etc/openshell-tls/openshell-ca.pem"), |
| 1099 | "bundle_exists": os.path.exists("/etc/openshell-tls/ca-bundle.pem"), |
| 1100 | } |
| 1101 | ) |
| 1102 | |
| 1103 | policy = _base_policy( |
| 1104 | network_policies={ |