Update app.py
Browse files
app.py
CHANGED
|
@@ -413,9 +413,15 @@ class GradioUI:
|
|
| 413 |
if has_memory:
|
| 414 |
print(f"Memory type: {type(session_data['agent'].memory)}")
|
| 415 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 416 |
# Prepare the system prompt
|
| 417 |
system_prompt = f"""You are a Vulnerability Intelligence Analyst. Complete the user request in {session_data.get('max_steps', 10)} steps maximum.
|
| 418 |
|
|
|
|
|
|
|
| 419 |
AVAILABLE TOOLS: nvd_search, web_search, cvedb_search, kevin_search, epss_search
|
| 420 |
|
| 421 |
CRITICAL RULES:
|
|
@@ -430,7 +436,7 @@ CRITICAL RULES:
|
|
| 430 |
- CORRECT LOGIC: If CVE affects "up to v22.1" and user asks about v24.0 then v24.0 is NOT vulnerable
|
| 431 |
- CORRECT LOGIC: If CVE affects "v25.0+" and user asks about v24.0 then v24.0 is NOT vulnerable
|
| 432 |
- CORRECT LOGIC: If CVE affects "below v25.0" and user asks about v24.0 then v24.0 is vulnerable
|
| 433 |
-
2. DATES: If user provides specific date, use that date. If user mentions "today", "current", "as of today", or "recent", use
|
| 434 |
3. PRODUCT SEARCH: ALWAYS use ONLY the base product name, NEVER include versions when using vulnerability tools (nvd_search, cvedb_search, kevin_search, epss_search)
|
| 435 |
4. SOURCES: Always prioritize vendor/original sources for CVE, CWE, and reference links (official vendor websites, security advisories)
|
| 436 |
5. SIMPLICITY: Keep code simple and logical. Avoid unnecessary library imports. Use only basic Python functions when needed.
|
|
|
|
| 413 |
if has_memory:
|
| 414 |
print(f"Memory type: {type(session_data['agent'].memory)}")
|
| 415 |
|
| 416 |
+
# Get current date for the prompt
|
| 417 |
+
from datetime import datetime
|
| 418 |
+
current_date = datetime.now().strftime("%Y-%m-%d")
|
| 419 |
+
|
| 420 |
# Prepare the system prompt
|
| 421 |
system_prompt = f"""You are a Vulnerability Intelligence Analyst. Complete the user request in {session_data.get('max_steps', 10)} steps maximum.
|
| 422 |
|
| 423 |
+
TODAY'S DATE: {current_date}
|
| 424 |
+
|
| 425 |
AVAILABLE TOOLS: nvd_search, web_search, cvedb_search, kevin_search, epss_search
|
| 426 |
|
| 427 |
CRITICAL RULES:
|
|
|
|
| 436 |
- CORRECT LOGIC: If CVE affects "up to v22.1" and user asks about v24.0 then v24.0 is NOT vulnerable
|
| 437 |
- CORRECT LOGIC: If CVE affects "v25.0+" and user asks about v24.0 then v24.0 is NOT vulnerable
|
| 438 |
- CORRECT LOGIC: If CVE affects "below v25.0" and user asks about v24.0 then v24.0 is vulnerable
|
| 439 |
+
2. DATES: If user provides specific date, use that date. If user mentions "today", "current", "as of today", or "recent", use TODAY'S DATE above.
|
| 440 |
3. PRODUCT SEARCH: ALWAYS use ONLY the base product name, NEVER include versions when using vulnerability tools (nvd_search, cvedb_search, kevin_search, epss_search)
|
| 441 |
4. SOURCES: Always prioritize vendor/original sources for CVE, CWE, and reference links (official vendor websites, security advisories)
|
| 442 |
5. SIMPLICITY: Keep code simple and logical. Avoid unnecessary library imports. Use only basic Python functions when needed.
|