You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor env, Docker, and docs; improve CLI defaults
Consolidates environment variable examples into .env.example and removes .env.webapp.example. Deletes Dockerfiles for GitHub, queue, and Telegram modes. Moves documentation images from docs/ to images/ and updates README references accordingly. Refactors pr_security_review/__main__.py to set CLI argument defaults from environment variables for GitHub App, docs directory, queue listener, and continuous monitoring. Cleans up README to remove redundant configuration file instructions.
# Optional: Enable SQL query debugging (set to true to see SQL queries in logs)
63
65
SQL_DEBUG=false
64
66
65
-
# LLM Prompts Configuration
67
+
# LLM Prompts Configuration (optional overrides for default prompts)
66
68
LLM_SECURITY_PROMPT_INTRO="You are a security expert specializing in Ethereum client implementations and blockchain security."
67
-
68
69
LLM_SECURITY_PROMPT_FOCUS_AREAS="Pay special attention to Blockchain specific vulnerabilities."
69
-
70
70
LLM_SECURITY_PROMPT_IMPORTANT_NOTES="IMPORTANT:\n- Focus on concrete exploitable vulnerabilities."
71
-
72
71
LLM_SECURITY_PROMPT_EXAMPLES="Examples of concrete vulnerabilities:\n- Gas costs that deviate from EIP specifications."
73
-
74
72
LLM_SECURITY_PROMPT_RESPONSE_FORMAT="CRITICAL: Your response must be ONLY the following JSON object, with no additional text, explanation, or markdown formatting:\n{\n \"confidence_score\": <use highest confidence from findings, or 100 if no vulnerabilities>,\n \"has_vulnerabilities\": <true/false>,\n \"findings\": [\n {\n \"severity\": \"<HIGH|MEDIUM|LOW>\",\n \"description\": \"<specific vulnerability with exact code location>\",\n \"recommendation\": \"<precise fix required>\",\n \"confidence\": <0-100, how certain you are about this specific vulnerability>,\n \"detailed_explanation\": \"<comprehensive explanation of what the issue is>\",\n \"impact_explanation\": \"<what can happen if this vulnerability is exploited>\",\n \"detailed_recommendation\": \"<detailed explanation of how to fix the issue>\",\n \"code_example\": \"<the existing problematic code block, with proposed changes highlighted using html-style comments>\",\n \"additional_resources\": \"<links to documentation or other resources>\"\n }\n ],\n \"summary\": \"<only mention concrete vulnerabilities found>\"\n}\n\nIMPORTANT: The overall confidence_score should match the highest confidence score from the findings.\nFor example, if you find one vulnerability with 90% confidence, the overall confidence_score should also be 90."
75
-
76
73
LLM_SECURITY_PROMPT_NO_VULNS_RESPONSE="If no clear vulnerabilities are found in the code changes, return:\n{\n\"confidence_score\": 100,\n\"has_vulnerabilities\": false,\n\"findings\": [],\n\"summary\": \"No concrete vulnerabilities identified in the changed code.\"\n}"
77
-
78
74
LLM_SKEPTICAL_VERIFICATION_INTRO="You are a skeptical security auditor tasked with CRITICALLY reviewing and VERIFYING potential vulnerabilities."
79
-
80
75
LLM_SKEPTICAL_VERIFICATION_CRITICAL_QUESTIONS="Ask yourself is this is really a vulnerability."
81
-
82
76
LLM_SKEPTICAL_VERIFICATION_BE_CRITICAL="Keep a critical mindset."
83
-
84
77
LLM_SKEPTICAL_VERIFICATION_ONLY_CONFIRM="Only confirm vulnerabilities you are very sure about."
85
-
86
78
LLM_SKEPTICAL_VERIFICATION_RESPONSE_FORMAT="Return ONLY a JSON object with your verification results:\n{\n\"verified_findings\": [\n {\n\"original_index\": <index of the original finding, starting from 0>,\n\"is_real_vulnerability\": <true/false>,\n\"verification_confidence\": <0-100>,\n\"reason\": \"<why you believe this is or isnt a real vulnerability>\"\n }\n ],\n\"summary\": \"<brief summary of your verification>\"\n}"
87
-
88
79
LLM_SYNTHESIS_PROMPT_INTRO="You are a security expert tasked with synthesizing multiple security analyses into a single coherent report."
89
-
90
80
LLM_SYNTHESIS_PROMPT_INSTRUCTION="Please synthesize these analyses into a single, coherent security report. Combine similar findings, use the highest confidence scores where appropriate, and create a unified summary."
91
-
92
81
LLM_SYNTHESIS_SYSTEM_PROMPT="You are a security expert specializing in code review. Return ONLY JSON output with no additional text or explanation."
93
-
94
82
LLM_SYNTHESIS_SYSTEM_PROMPT_ANTHROPIC="You are a skeptical security auditor. Return ONLY JSON output with no additional text or explanation."
95
-
96
83
LLM_SYNTHESIS_SYSTEM_PROMPT_SYNTHESIZE="You are a security expert specializing in synthesizing multiple analyses. Return ONLY JSON output with no additional text or explanation."
97
84
98
-
99
-
# End of .env.example
100
-
# Note: Rename this file to .env and fill in the actual values before running the application.
0 commit comments