Skip to main content

Injection and attack matrix

Français : ../injection-matrix.md

Tests live in services/control-plane/tests/ unless stated otherwise. Notation: file::test.

AttackLayerControlSettingsProving testResidual risk
SSRFTools, MCP, connectorseai.security.egress.EgressPolicy, check_url, address_verdict; eai.integrations.outbound.validate_url at save and call timeEAI_EGRESS_PRIVATE_ALLOWLIST, EAI_EGRESS_ALLOWED_PORTS, EAI_EGRESS_ALLOW_HTTPtest_security_egress.py::test_static_rejections, test_security_egress_wiring.py::test_tool_save_refused, test_security_egress_wiring.py::test_call_time_upstream_never_calledToo wide private allowlist; the posture flags it
DNS rebindingTools, MCPGuardedTransport / GuardedAsyncTransport: connect to the validated address, every DNS answer checked, redirects never followedEAI_EGRESS_DNS_TIMEOUT_SECONDStest_security_egress.py::test_dns_rebinding_between_check_and_connect_is_blocked, test_security_egress.py::test_dns_answers_are_all_validated, test_security_egress.py::test_redirects_are_never_followedHTTP clients outside guarded_client (forbidden in review)
DNS tunneling and exfiltrationNetworkCilium DNS L7 and default deny, deploy/cilium/baseline.yamlCilium values, network-dns-hardeningtest_platform_security_manifests.py::test_default_deny_and_metadata_denyAllowed names usable as a slow channel
ARP and DNS spoofing through NET_RAWPodsDropped capabilities, Kyverno deploy/policies/kyverno/pod-network-security.yamlpod-securitytest_platform_security_manifests.py::test_every_pod_spec_is_hardened, kyverno test deploy/policies/kyverno/tests (cases eai-pod-security/drop-all-capabilities and disallow-added-capabilities, resource net-raw-pod)Compromised nodes
Cloud metadataNetwork, applicationaddress_verdict (link-local always refused), Cilium deny policyno override possibletest_security_egress.py::test_metadata_and_link_local_stay_blocked_even_when_allowlisted, test_platform_security_manifests.py::test_kubernetes_flavour_excludes_metadataLow
SQL injectionDataParameterized queries, eai.db.ident, qualified, frag, set_clause, like_pattern, int_limitnonetest_security_sql_static.py::test_no_interpolated_sql_in_control_plane, test_security_sql_inputs.py::test_payloads_never_5xx_or_leak, test_security_sql_inputs.py::test_like_pattern_escapes, test_security_attack_suite.py::test_injection_fuzzNew code outside the static checker
ClickHouse injectionObservabilityAllowlisted table (eai_finops.usage_events, eai_telemetry.spans) sent only as the typed {table:Identifier} parameter, constant query text, JSONEachRow data in the body, insert_deduplication_token, least privilege eai-writer (INSERT only, prod), read only eai-reader, TLSEAI_CLICKHOUSE_URL, EAI_CLICKHOUSE_USER, EAI_CLICKHOUSE_TABLEtest_security_clickhouse.py::test_hostile_table_names_refused, test_security_clickhouse.py::test_hostile_env_table_refused, test_security_clickhouse.py::test_invalid_table_refused_before_any_http_request, test_security_clickhouse.py::test_query_text_constant_table_only_in_param, test_security_clickhouse.py::test_hostile_row_values_stay_json_one_line_per_row, test_security_clickhouse.py::test_hostile_dedup_token_refused, test_security_clickhouse.py::test_error_text_bounded_without_credentials, test_security_clickhouse.py::test_redirect_not_followed, test_security_clickhouse.py::test_prod_clickhouse_user_is_least_privilege_writer, test_security_clickhouse.py::test_eai_reader_is_read_onlyLow
Command injectionMultimodal, red teameai.integrations.safe_exec.run (argument list, no shell, minimal_env), check, media_inputnonetest_security_commands.py::test_payloads_refused, test_security_commands.py::test_run_uses_list_no_shell_minimal_env, test_security_commands.py::test_ffmpeg_refuses_input_specsffmpeg own vulnerabilities
Template and format-string injectionAgents, promptseai.domains.agents.kit.safe_format (declared variables only, no recursion)nonetest_security_inputs.py::test_safe_format_never_evaluates, test_security_inputs.py::test_prompt_render_does_not_expand_attributes, test_security_inputs.py::test_safe_format_linear_timeLow
Path traversalAPI (contracts, manifests, catalog), mediaName validation in routes (400, 404 or 422), safe_exec.media_input for medianonetest_security_inputs.py::test_path_traversal_rejectedLow
YAML and deserialization (billion laughs)System importeai.domains.system.safe_yaml (refuses anchors, aliases, oversized documents)EAI_MAX_BODY_BYTEStest_security_inputs.py::test_yaml_refuses_aliases_anchors_and_big_documentsLow
XSS (stored, reflected, DOM) and CSPPortalbuildCsp with makeNonce in portal/src/middleware.ts, safeHref, escaped React renderingnoneportal/tests/security.test.ts::buildCsp > carries the nonce and strict-dynamic, portal/tests/security.test.ts::buildCsp > never allows eval or inline scripts, portal/tests/security.test.ts::safeHref > refuses %s, portal/tests/zod-csp.test.ts::zod under a no-eval CSP > parses objects without calling the Function constructorThird party libraries in the portal
CSRFAPIBearer token or API key authentication, no API cookieEAI_CORS_ORIGINStest_deploy_ci_evidence.py::test_api_ignores_cookies_no_csrf_surfaceNone as long as no cookie authenticates the API
ClickjackingPortal, APIframe-ancestors / X-Frame-Options headers (security_headers, SECURITY_HEADERS)EAI_SECURITY_HEADERS_ENABLEDtest_security_http.py::test_headers_on_json_and_error_responsesLow
Open redirectPortalsafeReturnTononeportal/tests/security.test.ts::safeReturnTo > falls back for %s, portal/tests/security.test.ts::safeReturnTo > keeps internal pathsLow
CRLF and header injectionAPIASGI server refusing CR/LF, header caps (LimitsMiddleware), TrustedHostMiddleware (eai.main)EAI_ALLOWED_HOSTStest_security_http.py::test_header_and_query_caps, test_security_http.py::test_trusted_hostLow
Log injectionAPIAccess log as one escaped JSON line, security_event (_one_line)nonetest_security_http.py::test_access_log_is_one_escaped_json_lineLow
CSV and formula injectionFinOps, exportseai.domains.finops.importers.base.neutralize_formulanonetest_security_inputs.py::test_csv_formulas_neutralized, test_security_inputs.py::test_csv_import_keeps_numbers_and_quotes_formulasLow
ReDoSInjection detectionBounded input and linear patterns in eai.domains.privacy.injectionnonetest_security_prompt_injection.py::test_bounded_input_is_linearLow
Mass assignmentAPIPydantic patch models, set_clause with allowed columnsnonetest_security_inputs.py::test_patch_rejects_non_updatable_columns, test_security_inputs.py::test_role_escalation_refused, test_security_attack_suite.py::test_mass_assignment, test_security_attack_suite.py::test_viewer_cannot_mutateLow
IDOR and BOLADataPostgreSQL RLS through eai.db.tx, 404 for another tenant's resourcenonetest_security_inputs.py::test_cross_tenant_access_is_404, test_security_attack_suite.py::test_cross_tenant_idorAdmin queries outside RLS
Authentication attacks (JWT alg none, HS/RS confusion, kid, expiry)APIeai.auth: algorithm list, kid required with several keys, rate limited JWKS refresh, leeway; startup guard refusing HS* and noneEAI_JWT_ALGORITHMS, EAI_JWT_LEEWAY_SECONDStest_security_auth.py::test_alg_none_refused, test_security_auth.py::test_hs256_signed_with_public_key_refused, test_security_auth.py::test_kid_required_with_several_keys, test_security_auth.py::test_claims_enforced, test_security_auth.py::test_unknown_kid_refresh_is_rate_limitedIdP compromise
Brute force and rate limitingAPIeai.security.ratelimit: check_principal, record_auth_failure, check_auth_lockout, AnonymousRateLimitMiddleware; WAFEAI_RATE_LIMIT_ENABLED, EAI_RATE_LIMIT_PER_MINUTE, EAI_RATE_LIMIT_GATEWAY_PER_MINUTE, EAI_RATE_LIMIT_AUTH_FAILURES_PER_MINUTE, EAI_REDIS_URLtest_security_http.py::test_auth_failure_lockout_per_ip, test_security_http.py::test_rate_limit_per_principal, test_security_http.py::test_anonymous_per_ip, test_security_auth.py::test_api_key_format_checked_before_dbAttacks distributed over many IPs
Oversized and deeply nested bodiesAPIeai.security.limits.LimitsMiddleware, json_depth_exceedsEAI_MAX_BODY_BYTES, EAI_MAX_UPLOAD_BYTES, EAI_MAX_JSON_DEPTHtest_security_http.py::test_body_cap_content_length_and_chunked, test_security_http.py::test_json_depth, test_security_http.py::test_upload_routes_use_the_upload_cap, test_security_auth.py::test_token_size_capLow
Prompt injection (direct and indirect)LLM, agents, RAGeai.domains.privacy.injection.detect, guard.screen, guard.wrap_messages, guard.blocked_errorEAI_PROMPT_INJECTION_DEFAULT_MODE, tenant prompt_injection_mode, untrusted_content_wrappingtest_security_prompt_injection.py::test_detects_direct_injection_fr_en, test_security_prompt_injection.py::test_detects_obfuscated_injection, test_security_prompt_injection.py::test_indirect_injection_tool_message_and_wrapping, test_security_prompt_injection.py::test_indirect_injection_rag_part, test_security_prompt_injection.py::test_mode_off_detect_blockHeuristic detection can be bypassed; complement with garak and promptfoo
Exfiltration through model output (markdown images and links)LLMguard.OutputGuard, guard.StreamGuard, guard.host_allowedtenant output_links, output_link_allowlisttest_security_prompt_injection.py::test_output_guard_rules, test_security_prompt_injection.py::test_stream_guard_split_link, test_security_prompt_injection.py::test_output_links_non_stream_and_stream, test_security_prompt_injection.py::test_detects_exfiltrationallow mode chosen by the tenant
System prompt leakage (canary)LLMguard.new_canary, guard.add_canarytenant prompt_injection_modetest_security_prompt_injection.py::test_canary_leak_detect_and_blockParaphrase of the prompt without the canary
Secret leakage (SDK masking, logs)SDK, APIeai_*** masking in SDKs (python, go, java), errors without internal details (eai.errors), redacted URLs (outbound._redact)nonetest_security_http.py::test_errors_never_leak_internals, test_security_inputs.py::test_errors_do_not_leak_sqlSecrets pasted by users in a prompt (DLP)
Terminal injection in the CLICLIchat and logs strip ANSI sequences and escape control characters (cli)nonetest_security.py::test_terminal_output_is_neutralized, test_security.py::test_cli_chat_neutralizes_escape_sequences (Python SDK)Low
Webhook forgery and replayConnectors, channelsHMAC signature and timestamp (connectors.service._parse_signature, channels.service._check_signature)connector secretstest_capabilities_gateways.py::test_webhook_signature_replay_and_dedupe, test_security_attack_suite.py::test_webhook_signature_requiredLeaked webhook secret: rotate it
Indirect injection through a tool, MCP or connector result, a memory recall or an A2A messageTool Gateway, MCP Gateway, connector webhooks, memory, A2Aguard.screen_untrusted before reinjection: detection (injection.detect), tenant prompt_injection_mode (detect or block) and untrusted_content_wrapping, like RAG; events security.prompt_injection.detected (medium or high risk) and security.prompt_injection.blockedsecurity.prompt_injection_mode, security.untrusted_content_wrappingtest_gateway_pep_untrusted.py::test_untrusted_tool_result, test_gateway_pep_untrusted.py::test_untrusted_mcp_result, test_gateway_pep_untrusted.py::test_untrusted_connector_webhook, test_gateway_pep_untrusted.py::test_untrusted_memory_recall, test_gateway_pep_untrusted.py::test_untrusted_a2a_messageHeuristics: a rephrased injection can pass in detect mode, wrapping stays the defence in depth
Gateway action without a policy decisionMCP, knowledge, memory, realtime, connectors, channels, multimodal, A2A, Model GatewayPEP policy.gate before any outbound call, decision in eai.policy_decisions, 403 policy_denied; OPA package eai.gateway_access (deploy/policies/opa/gateway_access.rego)tenant policies, data.eai.config.gateway_accesstest_gateway_pep_untrusted.py::test_pep_model_gateway_denied, test_gateway_pep_untrusted.py::test_pep_mcp_denied, test_gateway_pep_untrusted.py::test_pep_knowledge_and_memory_denied, test_gateway_pep_untrusted.py::test_pep_realtime_multimodal_denied, test_gateway_pep_untrusted.py::test_pep_connector_channel_a2a_denied, gateway_access_test.rego (opa test)An approval obligation is refused at synchronous entry points
Supply chain (signed images, SBOM, dependency audits)CI/CDJobs trivy-image, sbom-sign, pip-audit, npm-audit (.gitlab-ci.yml), security-deps-python, security-deps-node, security-manifests (.forgejo/workflows/ci.yml), Kyvernoci-security-gatestest_deploy_ci_evidence.py::test_kyverno_platform_images_need_ci_keyUnknown vulnerabilities (0-day)