Repository navigation
Conversation
| decoded[key] = base64.b64decode(raw).decode("utf-8") | ||
| return decoded | ||
| except Exception as exc: | ||
| logger.debug("Secret %s not found in %s: %s", SESSION_SECRET_NAME, namespace, exc) |
Check failure
Code scanning / CodeQL
Log Injection High
| decoded[key] = base64.b64decode(raw).decode("utf-8") | ||
| return decoded | ||
| except Exception as exc: | ||
| logger.debug("Secret %s not found in %s: %s", SESSION_SECRET_NAME, namespace, exc) |
Check failure
Code scanning / CodeQL
Log Injection High
| resp = httpx.get( | ||
| f"{url}/api/v1/sandbox/team1/sessions", | ||
| timeout=10, | ||
| verify=False, | ||
| ) |
Check failure
Code scanning / CodeQL
Log Injection High
|
|
||
| try: | ||
| async with httpx.AsyncClient(timeout=180.0) as client: | ||
| resp = await client.post(f"{agent_url}/", json=a2a_msg) |
Check failure
Code scanning / CodeQL
Log Injection High
6edd3dc to
c58790f
Compare
| # --- Create the Deployment --- | ||
| try: | ||
| kube.create_deployment(namespace=namespace, body=deployment_manifest) | ||
| logger.info(f"Created Deployment '{request.name}' in namespace '{namespace}'") |
Check failure
Code scanning / CodeQL
Log Injection High
| logger.info(f"Created Deployment '{request.name}' in namespace '{namespace}'") | ||
| except ApiException as e: | ||
| if e.status == 409: | ||
| logger.warning(f"Deployment '{request.name}' already exists in namespace '{namespace}'") |
Check failure
Code scanning / CodeQL
Log Injection High
| # --- Create the Service --- | ||
| try: | ||
| kube.create_service(namespace=namespace, body=service_manifest) | ||
| logger.info(f"Created Service '{request.name}' in namespace '{namespace}'") |
Check warning
Code scanning / CodeQL
Information exposure through an exception Medium
| logger.info(f"Created Service '{request.name}' in namespace '{namespace}'") | ||
| except ApiException as e: | ||
| if e.status == 409: | ||
| logger.warning(f"Service '{request.name}' already exists in namespace '{namespace}'") |
Check warning
Code scanning / CodeQL
Information exposure through an exception Medium
| service_name=request.name, | ||
| service_port=8000, | ||
| ) | ||
| logger.info(f"Created Route for '{request.name}' in namespace '{namespace}'") |
Check failure
Code scanning / CodeQL
Log Injection High
| agent_url = f"http://{request.name}.{namespace}.svc.cluster.local:8000" | ||
| except ApiException as e: | ||
| # Route creation failure is non-fatal — the agent is still accessible in-cluster | ||
| logger.warning(f"Failed to create Route for '{request.name}': {e}") |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information High
| async with client.stream( | ||
| "POST", | ||
| agent_url, | ||
| json=a2a_msg, | ||
| headers=headers, | ||
| ) as response: |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information High
| }, | ||
| } | ||
|
|
||
| logger.info("Starting sandbox SSE stream to %s (session=%s)", agent_url, session_id) |
Check failure
Code scanning / CodeQL
Log Injection High
| }, | ||
| } | ||
|
|
||
| logger.info("Starting sandbox SSE stream to %s (session=%s)", agent_url, session_id) |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information High
| for row in rows: | ||
| active_counts[row["agent"]] = row["cnt"] | ||
| except Exception as exc: | ||
| logger.debug("Could not query session counts for %s: %s", namespace, exc) |
Check failure
Code scanning / CodeQL
Log Injection High
| label_selector="kagenti.io/type=agent", | ||
| ) | ||
| except Exception as exc: | ||
| logger.warning("Failed to list deployments in %s: %s", namespace, exc) |
Check failure
Code scanning / CodeQL
Log Injection High
|
|
||
| return StreamingResponse( | ||
| _stream_a2a_response(agent_url, request.message, session_id, authorization), | ||
| _stream_a2a_response(agent_url, request.message, session_id, authorization, user.username), |
Check failure
Code scanning / CodeQL
Log Injection High
| _stream_sandbox_response( | ||
| agent_url, | ||
| request.message, | ||
| session_id, | ||
| owner=user.username, | ||
| namespace=namespace, | ||
| ), |
Check failure
Code scanning / CodeQL
Log Injection High
| logger.info( | ||
| "User %s denied HITL request for session %s in namespace %s", | ||
| user.username, | ||
| context_id, |
Check failure
Code scanning / CodeQL
Log Injection High
| "User %s denied HITL request for session %s in namespace %s", | ||
| user.username, | ||
| context_id, | ||
| namespace, |
Check failure
Code scanning / CodeQL
Log Injection High
Check failure
Code scanning / CodeQL
Log Injection High
Check failure
Code scanning / CodeQL
Log Injection High
| string_data={"apikey": request.llm_api_key}, | ||
| labels=managed_labels, | ||
| ) | ||
| logger.info(f"Created LLM API key Secret '{llm_secret}' in namespace '{namespace}'") |
Check warning
Code scanning / CodeQL
Information exposure through an exception Medium
| string_data={"apikey": request.llm_api_key}, | ||
| labels=managed_labels, | ||
| ) | ||
| logger.info(f"Created LLM API key Secret '{llm_secret}' in namespace '{namespace}'") |
Check failure
Code scanning / CodeQL
Log Injection High
| labels=managed_labels, | ||
| ) | ||
| logger.info( | ||
| f"Created GitHub PAT Secret '{github_pat_secret}' in namespace '{namespace}'" |
Check failure
Code scanning / CodeQL
Log Injection High
| labels=managed_labels, | ||
| ) | ||
| logger.info( | ||
| f"Created GitHub PAT Secret '{github_pat_secret}' in namespace '{namespace}'" |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information High
| items = [_crd_to_summary(obj) for obj in result.get("items", [])] | ||
| return IntegrationListResponse(items=items) | ||
| except Exception as e: | ||
| logger.error(f"Failed to list integrations in {namespace}: {e}") |
Check warning
Code scanning / CodeQL
Information exposure through an exception Medium
| status_code=status.HTTP_404_NOT_FOUND, | ||
| detail=f"Integration {namespace}/{name} not found", | ||
| ) | ||
| logger.error(f"Failed to get integration {namespace}/{name}: {e}") |
Check failure
Code scanning / CodeQL
Log Injection High
| status_code=status.HTTP_404_NOT_FOUND, | ||
| detail=f"Integration {namespace}/{name} not found", | ||
| ) | ||
| logger.error(f"Failed to update integration {namespace}/{name}: {e}") |
Check failure
Code scanning / CodeQL
Log Injection High
| status_code=status.HTTP_404_NOT_FOUND, | ||
| detail=f"Integration {namespace}/{name} not found", | ||
| ) | ||
| logger.error(f"Failed to delete integration {namespace}/{name}: {e}") |
Check failure
Code scanning / CodeQL
Partial server-side request forgery Critical
| "message": f"Repository returned status {response.status_code}", | ||
| } | ||
| except httpx.HTTPError as e: | ||
| return {"success": False, "message": f"Connection failed: {e!s}"} |
Check failure
Code scanning / CodeQL
Log Injection High
| if creds: | ||
| logger.info( | ||
| "Using DB credentials from secret for namespace=%s (host=%s)", | ||
| namespace, |
Check failure
Code scanning / CodeQL
Log Injection High
| logger.info( | ||
| "Using DB credentials from secret for namespace=%s (host=%s)", | ||
| namespace, | ||
| creds["host"], |
Check failure
Code scanning / CodeQL
Partial server-side request forgery Critical
| # Convention-based fallback | ||
| logger.warning( | ||
| "Secret %s not found in %s — using convention-based fallback", | ||
| SESSION_SECRET_NAME, |
Check failure
Code scanning / CodeQL
Partial server-side request forgery Critical
| logger.warning( | ||
| "Secret %s not found in %s — using convention-based fallback", | ||
| SESSION_SECRET_NAME, | ||
| namespace, |
Check failure
Code scanning / CodeQL
Log Injection High
| if not pool._closed: | ||
| return pool | ||
| # Pool was closed externally — recreate | ||
| logger.warning("DB pool for namespace=%s was closed — recreating", namespace) |
Check failure
Code scanning / CodeQL
Log Injection High
| del _pool_cache[namespace] | ||
|
|
||
| dsn = _dsn_for_namespace(namespace) | ||
| logger.info("Creating session DB pool for namespace=%s", namespace) |
Check failure
Code scanning / CodeQL
Log Injection High
| response = await client.get(card_url) | ||
| response.raise_for_status() | ||
| try: | ||
| response = await client.get(card_url) |
Check failure
Code scanning / CodeQL
Log Injection High
| # Fallback to port 8000 (sandbox agents without AuthBridge) | ||
| agent_url = _get_agent_url(name, namespace, port=8000) | ||
| card_url = f"{agent_url}{A2A_AGENT_CARD_PATH}" | ||
| response = await client.get(card_url) |
Check failure
Code scanning / CodeQL
Bad HTML filtering regexp High
| # Log the event | ||
| logger.info( | ||
| "Webhook received: integration=%s/%s event=%s delivery=%s agents=%d", | ||
| namespace, |
Check failure
Code scanning / CodeQL
Log Injection
| logger.info( | ||
| "Webhook received: integration=%s/%s event=%s delivery=%s agents=%d", | ||
| namespace, | ||
| name, |
Check failure
Code scanning / CodeQL
Log Injection
| resp = await client.post( | ||
| f"{agent_url}/ap/v1/agent/tasks/send", | ||
| json=a2a_payload, | ||
| timeout=30.0, | ||
| ) |
Check failure
Code scanning / CodeQL
Partial server-side request forgery
| return { | ||
| "received": True, | ||
| "event": event_type, | ||
| "delivery_id": delivery_id, | ||
| "agents_notified": len(results), | ||
| "results": results, | ||
| } |
Check failure
Code scanning / CodeQL
Log Injection High
| if security_warnings: | ||
| logger.warning( | ||
| "Security warnings for '%s': %s", | ||
| composable_name, |
Check failure
Code scanning / CodeQL
Log Injection
| logger.warning( | ||
| "Security warnings for '%s': %s", | ||
| composable_name, | ||
| "; ".join(security_warnings), |
Check failure
Code scanning / CodeQL
Log Injection
| label_selector=f"app={agent_name}", | ||
| ) | ||
| except ApiException as exc: | ||
| logger.error("K8s error listing pods for %s/%s: %s", namespace, agent_name, exc) |
Check failure
Code scanning / CodeQL
Log Injection
| label_selector=f"app={agent_name}", | ||
| ) | ||
| except ApiException as exc: | ||
| logger.error("K8s error listing pods for %s/%s: %s", namespace, agent_name, exc) |
Check failure
Code scanning / CodeQL
Log Injection
| except ApiException as exc: | ||
| logger.error( | ||
| "K8s exec error in %s/%s: %s", | ||
| namespace, |
Check failure
Code scanning / CodeQL
Log Injection
commented
Mar 3, 2026
Session G Summary — UI Test Suite Fix + InfrastructureTest Results on sbox42Before: 142/193 passed (73.6%) 50+ tests fixed across 13 spec files. 3 remaining failures are all live LLM agent execution issues (Mistral generates tool call JSON as text instead of executing tools). Key FixesApplication bugs:
Infrastructure:
Test patterns discovered:
New Skills
Commits: 31 |
| session_id, | ||
| ) | ||
| except Exception: | ||
| logger.debug("Failed to set owner on session %s", session_id) |
Check failure
Code scanning / CodeQL
Log Injection
|
|
||
| try: | ||
| async with httpx.AsyncClient(timeout=180.0) as client: | ||
| resp = await client.post(f"{agent_url}/", json=a2a_msg) |
Check failure
Code scanning / CodeQL
Partial server-side request forgery
| "User %s denied HITL request for session %s in namespace %s", | ||
| user.username, | ||
| context_id, | ||
| namespace, |
Check failure
Code scanning / CodeQL
Log Injection
| logger.info( | ||
| "User %s denied HITL request for session %s in namespace %s", | ||
| user.username, | ||
| context_id, |
Check failure
Code scanning / CodeQL
Log Injection
| "User %s approved HITL request for session %s in namespace %s", | ||
| user.username, | ||
| context_id, | ||
| namespace, |
Check failure
Code scanning / CodeQL
Log Injection
| logger.info( | ||
| "User %s approved HITL request for session %s in namespace %s", | ||
| user.username, | ||
| context_id, |
Check failure
Code scanning / CodeQL
Log Injection
| except httpx.HTTPStatusError as e: | ||
| raise HTTPException(e.response.status_code, f"Agent returned {e.response.status_code}") | ||
| except httpx.RequestError as e: | ||
| logger.warning("Failed to fetch agent card from %s: %s", card_url, e) |
Check failure
Code scanning / CodeQL
Log Injection
| body=body, | ||
| ) | ||
| return result.to_dict() | ||
| logger.error(f"Error creating ConfigMap {name} in {namespace}: {e}") |
Check failure
Code scanning / CodeQL
Log Injection
| except ApiException as e: | ||
| if e.status == 409: | ||
| # ConfigMap already exists — patch it | ||
| logger.info(f"ConfigMap '{name}' already exists in {namespace}, patching") |
Check failure
Code scanning / CodeQL
Log Injection
| data={"skill_pack_loader.py": loader_script}, | ||
| labels=managed_cm_labels, | ||
| ) | ||
| logger.info(f"Created skill-loader-script ConfigMap for '{request.name}' in '{namespace}'") |
Check failure
Code scanning / CodeQL
Log Injection
| data={"skill-packs.yaml": skill_packs_yaml}, | ||
| labels=managed_cm_labels, | ||
| ) | ||
| logger.info(f"Created skill-packs ConfigMap for '{request.name}' in '{namespace}'") |
Check failure
Code scanning / CodeQL
Log Injection
| import re | ||
|
|
||
| text = re.sub( | ||
| r"<script[^>]*>.*?</script>", "", text, flags=re.DOTALL |
Check failure
Code scanning / CodeQL
Bad HTML filtering regexp
node_transition is the most frequent event (96 in test sessions) but was missing from UI catalog. hitl_request was defined in agent graph card but not in the UI. Both now properly categorized. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
MESSAGES_SET used stale closure messages, wiping the user message when the loop card appeared. Removed the dispatch entirely — loop card renders independently, flat content suppressed by seenLoopId. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
Events mode in topology view now shows event types as nodes connected by observed sequential transitions. Each node = one event type from EVENT_CATALOG, edges show how often one event follows another. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
Was grouping by EVENT_CATALOG category (Reasoning, Execution, etc.) Now groups by actual langgraph node name (planner, executor, reflector, reporter, etc.) — each node = one merged group. Colors by category. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
Backend: - events table with per-event storage and auto-migration - Paginated API: GET /events, GET /tasks/paginated - SSE event persistence (async per-event INSERT) - GET /sandbox/defaults endpoint for wizard UI: - Turn blocks: task_id-based pairing, user msg always before loop - Load earlier messages pagination in chat - EventSubtypeGraphView: 14 subtype nodes, runtime DAG, edge counters - Graph streaming animations: node pulse, edge flow, visited dimming - Message sidebar with "Load 5 more" pagination - Reporter cleanup: filter hidden meta events, clean STEP_BOUNDARY - Wizard loads defaults from backend API, Landlock toggle subtitle - 92 new graph unit tests (114 total passing) Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
Signed-off-by: Ladislav Smola <[email protected]>
- Replace all Unicode escape sequences (✓✗▶▼⏳📄❌) with plain text equivalents ([done], [failed], [running], [+]/[-], etc.) across 5 graph view components - Fix graph sidebar scroll: change overflow hidden→auto on container - Update 8 test assertions to match new plain text values Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
…pty finalAnswer The SUBSCRIBE_DONE reducer checked loop.finalAnswer to decide done vs failed. When reporter_output contains leaked reflector text (like "done"), loopBuilder sets finalAnswer to empty string — which is falsy, causing the loop to be incorrectly marked as "failed" even though the agent completed successfully. Fix: also check for reporter step presence, not just finalAnswer content. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
Signed-off-by: Ladislav Smola <[email protected]>
…mbos
- Remove EventSubtypeGraphView tab (file kept, disconnected from UI)
- Fix animation CSS: visited/inactive nodes stay full opacity (no dimming)
- Active node gets stronger glow + blue outline for visibility
- Animations verified in all 4 combinations: Step Graph × {Nodes,Events}
+ Topology × {Nodes,Events}
Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Ladislav Smola <[email protected]>
…nect Backend: - Background event consumer (asyncio.Task) persists ALL events to events table independently of UI connection. Survives UI disconnects. - Consumer reconnects with exponential backoff (2s-60s, max 10 retries) - Consumer registry prevents duplicates, auto-cleans on completion - Spawned on initial stream + subscribe reconnect (idempotent) - Persists to both events table + loop_events blob (backward compat) UI: - History loading prefers events table (source of truth) over blob - lastEventIndex tracking for deduplication on reconnect - Gap-fill on SSE reconnect: fetch missed events from events table - Falls back to loop_events blob for old sessions without events data Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
…her components GraphDetailPanel: status icons, expand arrows, nav arrows, breadcrumbs SimpleLoopCard: expand toggle, middle-dot separators AgentLoopCard: expand toggle SessionSidebar: sub-session expand AppLayout: theme checkmarks LoopSummaryBar: separators, expand toggle SandboxPage: step expand toggle Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
…ials - HyperShift: fetch kubeadmin password from management cluster secret when local kubeadmin-password file doesn't exist - Add LiteLLM proxy section: master key + team1 virtual key - Both compact and verbose views updated Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
…ose views Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
- Raise backend max limit to 2000 (large sessions can have 400+ events) - Fix UI to request 500 instead of 1000 Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
…nts table - Remove MessageSidebar from TopologyGraphView (GraphLoopView wrapper provides it) - Remove sidebar toggle button from TopologyGraphView - Remove per-event persistence from SSE proxy (background consumer handles it) This fixes duplicate events with different event_index values causing wrong ordering in UI Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
commented
Jun 12, 2026
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this PR is still relevant, please comment or remove the stale label. |
commented
Jun 27, 2026
|
This pull request was closed because it has been stale for 14 days with no activity. Feel free to reopen if this is still relevant. |
Summary
Implements the agent sandbox infrastructure for running skills-driven coding agents in Kubernetes isolation. This covers Phases 1-9 of the sandbox agent research design:
Key files
.github/scripts/kagenti-operator/35-deploy-agent-sandbox.sh— Controller deployment script.github/scripts/local-setup/hypershift-full-test.sh— Phase 2.5 integrationdeployments/sandbox/— All sandbox infrastructure (proxy, templates, Python modules)Related
docs/plans/2026-02-23-sandbox-agent-research.mdTest plan
kagenti-team-sbox(2 workers, v1.33.6)🤖 Generated with Claude Code