Platform scripts, MCP servers, deployment and docs for the KAB runs

- Scripts to run workflows from a YAML context or run inputs (kab_run_workflow.py, with
  --input name=@file), store per-project discovery connections, bootstrap agent MCP keys,
  refresh the KAB token, publish reports and build estate snapshots.
- Hyperscaler discovery servers extended in place; cloud-knowledge folded into them.
- deploy/crucible-kab-dev.yaml: the Discovery package agent and the Assessment agents.
- Platform issue write-ups and current-wiring notes under docs/platform-issues/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-05 22:13:25 +00:00
parent c14a94f33b
commit f659564208
71 changed files with 2818 additions and 2821 deletions

View File

@@ -21,6 +21,9 @@ SECRET_KEYS = (
"appsettings", "env", "envvars", "environmentvariables", "variables", "password", "adminpassword", "secret",
"secretvalue", "sastoken", "accesskey", "primarykey", "secondarykey", "privatekey", "kubeconfig", "credentials",
)
# A single value under one of these keys is a tag or label (env=dev), not a secret: only a list or map under it (a
# container's environment variables) is redacted.
SCALAR_SAFE_KEYS = ("env",)
# Values under these keys name a person, or may. A principal of unknown type counts as a person.
PERSON_KEYS = (
"createdby", "lastmodifiedby", "updatedby", "creator", "owner", "owneremail", "contact", "contactemail", "email",
@@ -54,10 +57,14 @@ def _anonymise_member(value: str) -> str:
return _clean_text(value)
def _scalar(value) -> bool:
return value is None or isinstance(value, (str, bool, int, float))
def _scrub(value, key: str = ""):
"""Drop secrets and anonymise people, however deep. Every tool's reply passes through here."""
lowered = key.lower().replace("_", "").replace("-", "")
if lowered in SECRET_KEYS:
if lowered in SECRET_KEYS and not (lowered in SCALAR_SAFE_KEYS and _scalar(value)):
return "[redacted]"
if lowered in PERSON_KEYS:
return "[user]"
@@ -67,7 +74,7 @@ def _scrub(value, key: str = ""):
for name in ("Value", "value"):
if name in cleaned and tag in PERSON_KEYS:
cleaned[name] = "[user]"
elif name in cleaned and tag in SECRET_KEYS:
elif name in cleaned and tag in SECRET_KEYS and not (tag in SCALAR_SAFE_KEYS and _scalar(cleaned[name])):
cleaned[name] = "[redacted]"
return cleaned
if isinstance(value, (list, tuple)):