V10.515 收緊 Webcrumbs host data 授權
All checks were successful
CD Pipeline / deploy (push) Successful in 1m6s

This commit is contained in:
OoO
2026-05-31 20:59:47 +08:00
parent f3a3cfe52a
commit 353465d38a
8 changed files with 96 additions and 10 deletions

View File

@@ -32,7 +32,13 @@ def test_external_tool_bridge_pages_are_diagnostic_not_blank():
css = (ROOT / "web/static/css/page-external-tools.css").read_text(encoding="utf-8")
assert "build_external_tool_payload" in route_source
assert "def build_external_tool_payload(kind)" in service_source
assert "def _has_sensitive_webcrumbs_access()" in route_source
assert "hmac.compare_digest(provided, internal_key)" in route_source
assert "include_host_data=_has_sensitive_webcrumbs_access()" in route_source
assert "def build_external_tool_payload(kind, include_host_data: bool = True)" in service_source
assert "include_host_data: bool = True" in service_source
assert "def build_webcrumbs_auth_required_seed_data()" in service_source
assert "auth_required" in service_source
assert 'parsed.path.rstrip("/") == bridge_path.rstrip("/")' in service_source
assert "def _is_blocked_external_url(configured_url)" in service_source
assert "external-tool-checks" in template
@@ -41,6 +47,8 @@ def test_external_tool_bridge_pages_are_diagnostic_not_blank():
assert "def webcrumbs_status()" in route_source
assert "@system_public_bp.route('/api/webcrumbs/marketplace-host-data')" in route_source
assert "def webcrumbs_marketplace_host_data_api()" in route_source
assert "if not _has_sensitive_webcrumbs_access()" in route_source
assert "'error': 'auth_required'" in route_source
assert "build_webcrumbs_seed_data(limit=limit)" in route_source
assert "'allowed_match_contract': 'exact/total_price/price_alert_exact'" in route_source
assert "def webcrumbs_asset_proxy(asset_path)" in route_source