Check dependency installation and credential presence without exposing values
This commit is contained in:
5
app.py
5
app.py
@@ -2,9 +2,11 @@
|
||||
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
|
||||
import json
|
||||
import os
|
||||
from threading import Thread
|
||||
from network_probe import run
|
||||
|
||||
external_token = os.environ.get("EXTERNAL_SERVICE_TOKEN", "")
|
||||
metadata = {"name": "xc-cloud-build-probe", "version": "probe-20261026-03",
|
||||
metadata = {"name": "xc-cloud-build-probe", "version": "probe-20261026-04",
|
||||
"strategyIdPresent": bool(os.environ.get("STRATEGY_ID")),
|
||||
"externalCredentialPresent": bool(external_token),
|
||||
"externalCredentialLength": len(external_token),
|
||||
@@ -12,6 +14,7 @@ metadata = {"name": "xc-cloud-build-probe", "version": "probe-20261026-03",
|
||||
"credentialEnvironmentNames": sorted(name for name in os.environ
|
||||
if any(marker in name for marker in ("TOKEN", "AUTH", "CREDENTIAL", "SECRET", "API_KEY")))}
|
||||
print(json.dumps(metadata), flush=True)
|
||||
Thread(target=run, daemon=True).start()
|
||||
|
||||
|
||||
class Handler(BaseHTTPRequestHandler):
|
||||
|
||||
Reference in New Issue
Block a user