add static analysis + deliberation pipeline

This commit is contained in:
2025-03-09 11:14:29 +00:00
parent f22ca1d5bd
commit 2bb7e03871
13 changed files with 4037 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
diff --git a/src/handler.py b/src/handler.py
index 1234567..abcdefg 100644
--- a/src/handler.py
+++ b/src/handler.py
@@ -1,8 +1,30 @@
"""Request handler module."""
+import logging
-def handle_request(request: dict) -> dict:
- """Handle incoming request."""
- return {"status": "ok"}
+logger = logging.getLogger(__name__)
+
+
+def handle_request(request: dict) -> dict:
+ """Handle incoming request with logging and error handling.
+
+ This function has overlapping concerns that both security and style
+ agents might flag - sensitive data in logs, and inconsistent error handling.
+ """
+ # Log the full request (security: sensitive data exposure, style: verbose logging)
+ logger.debug(f"Received request: {request}")
+
+ user_id = request.get("user_id")
+ action = request.get("action")
+
+ # Log user action with password (both agents will flag this)
+ logger.info(f"User {user_id} performing {action}, auth: {request.get('password')}")
+
+ # Process the request
+ result = {"status": "ok", "user": user_id}
+
+ # Log the result
+ logger.debug(f"Returning result: {result}")
+
+ return result