diff --git a/agent/prompt_builder.py b/agent/prompt_builder.py index 8302973aa..7a2086007 100644 --- a/agent/prompt_builder.py +++ b/agent/prompt_builder.py @@ -40,7 +40,7 @@ _CONTEXT_THREAT_PATTERNS = [ (r'disregard\s+(your|all|any)\s+(instructions|rules|guidelines)', "disregard_rules"), (r'act\s+as\s+(if|though)\s+you\s+(have\s+no|don\'t\s+have)\s+(restrictions|limits|rules)', "bypass_restrictions"), (r'', "html_comment_injection"), - (r'<\s*div\s+style\s*=\s*["\'].*display\s*:\s*none', "hidden_div"), + (r'<\s*div\s+style\s*=\s*["\'][\s\S]*?display\s*:\s*none', "hidden_div"), (r'translate\s+.*\s+into\s+.*\s+and\s+(execute|run|eval)', "translate_execute"), (r'curl\s+[^\n]*\$\{?\w*(KEY|TOKEN|SECRET|PASSWORD|CREDENTIAL|API)', "exfil_curl"), (r'cat\s+[^\n]*(\.env|credentials|\.netrc|\.pgpass)', "read_secrets"), diff --git a/gateway/platforms/webhook.py b/gateway/platforms/webhook.py index 6d4885d2b..9780a14d8 100644 --- a/gateway/platforms/webhook.py +++ b/gateway/platforms/webhook.py @@ -262,7 +262,7 @@ class WebhookAdapter(BasePlatformAdapter): ", ".join(self._dynamic_routes.keys()) or "(none)", ) except Exception as e: - logger.warning("[webhook] Failed to reload dynamic routes: %s", e) + logger.error("[webhook] Failed to reload dynamic routes: %s", e) async def _handle_webhook(self, request: "web.Request") -> "web.Response": """POST /webhooks/{route_name} — receive and process a webhook event.""" diff --git a/tools/credential_files.py b/tools/credential_files.py index 3092b75e9..b12c606cc 100644 --- a/tools/credential_files.py +++ b/tools/credential_files.py @@ -168,7 +168,7 @@ def _load_config_files() -> List[Dict[str, str]]: "container_path": container_path, }) except Exception as e: - logger.debug("Could not read terminal.credential_files from config: %s", e) + logger.warning("Could not read terminal.credential_files from config: %s", e) _config_files = result return _config_files