Spaces:
Sleeping
Sleeping
Commit
·
853781b
1
Parent(s):
efadfea
Fixed app v2
Browse files
app.py
CHANGED
@@ -35,10 +35,17 @@ async def analyze_security_logs(request: LogRequest):
|
|
35 |
try:
|
36 |
# Security-focused prompt
|
37 |
prompt = (
|
38 |
-
"
|
39 |
-
"
|
40 |
-
"
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
)
|
43 |
|
44 |
# Generate response with controlled max tokens
|
|
|
35 |
try:
|
36 |
# Security-focused prompt
|
37 |
prompt = (
|
38 |
+
"You are an advanced cybersecurity analysis assistant. Carefully analyze the following network log data for any indicators of malicious or suspicious activity. "
|
39 |
+
"Specifically, look for patterns or unusual events that might suggest unauthorized access, data exfiltration, suspicious IP addresses, frequent access attempts, "
|
40 |
+
"or other anomalies. Provide a detailed analysis that includes:\n\n"
|
41 |
+
"1. A list of any suspicious IP addresses with explanations of why they are flagged as such.\n"
|
42 |
+
"2. Any patterns or sequences in the logs that could indicate an ongoing attack or probing activity.\n"
|
43 |
+
"3. Identified unauthorized access attempts, with details on the methods or vulnerabilities being exploited, if detectable.\n"
|
44 |
+
"4. Recommendations on immediate actions or mitigations the system administrator should take to address any identified threats.\n"
|
45 |
+
"5. An assessment of the overall security posture based on the log data, including any potential weaknesses or areas for improvement.\n\n"
|
46 |
+
"Log Data:\n"
|
47 |
+
f"{request.log_data}\n\n"
|
48 |
+
"Please provide a comprehensive response addressing all points in detail."
|
49 |
)
|
50 |
|
51 |
# Generate response with controlled max tokens
|