feat(api): production security, cors hardening, latency optimizations, postman artifacts & frontend documentation
This commit is contained in:
@@ -0,0 +1,218 @@
|
||||
[
|
||||
{
|
||||
"id": "SEC-001",
|
||||
"category": "Security / Injection",
|
||||
"name": "SQL Injection in patient.id field",
|
||||
"endpoint": "POST /v1/voice-onboarding/start",
|
||||
"status_code": 200,
|
||||
"passed": true,
|
||||
"response": {
|
||||
"success": true,
|
||||
"session_id": "VOICE-AEB1741B",
|
||||
"patient_id": "' OR '1'='1' --",
|
||||
"category": {
|
||||
"type": "general",
|
||||
"code": "general_medicine",
|
||||
"name": "General Medicine / Primary Care (Auto-Triage)"
|
||||
},
|
||||
"language": "en-IN",
|
||||
"status": "in_progress",
|
||||
"stage": "greeting",
|
||||
"greeting_text": "Hello SQLi Test, welcome to CureSelect Healthcare. Could you please share what health symptoms you are experiencing today?",
|
||||
"audio_url": "/v1/voice-onboarding/audio/aud_5aafc422affd",
|
||||
"response_time_ms": 40.53,
|
||||
"response_time_sec": 0.041
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "SEC-002",
|
||||
"category": "Security / XSS",
|
||||
"name": "Cross-Site Scripting (XSS) in patient.name",
|
||||
"endpoint": "POST /v1/voice-onboarding/start",
|
||||
"status_code": 200,
|
||||
"passed": false,
|
||||
"response": {
|
||||
"success": true,
|
||||
"session_id": "VOICE-75F027F8",
|
||||
"patient_id": "PAT-XSS1",
|
||||
"category": {
|
||||
"type": "general",
|
||||
"code": "general_medicine",
|
||||
"name": "General Medicine / Primary Care (Auto-Triage)"
|
||||
},
|
||||
"language": "en-IN",
|
||||
"status": "in_progress",
|
||||
"stage": "greeting",
|
||||
"greeting_text": "Hello <script>alert('XSS')</script>, welcome to CureSelect Healthcare. Could you please share what health symptoms you are experiencing today?",
|
||||
"audio_url": "/v1/voice-onboarding/audio/aud_585aabd8e52e",
|
||||
"response_time_ms": 35.07,
|
||||
"response_time_sec": 0.035
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "BND-001",
|
||||
"category": "Boundary / Validation",
|
||||
"name": "Negative Age Input (age = -25)",
|
||||
"endpoint": "POST /v1/voice-onboarding/start",
|
||||
"status_code": 200,
|
||||
"passed": true,
|
||||
"response": {
|
||||
"success": true,
|
||||
"session_id": "VOICE-788AA6B0",
|
||||
"patient_id": "PAT-NEG-AGE",
|
||||
"category": {
|
||||
"type": "general",
|
||||
"code": "general_medicine",
|
||||
"name": "General Medicine / Primary Care (Auto-Triage)"
|
||||
},
|
||||
"language": "en-IN",
|
||||
"status": "in_progress",
|
||||
"stage": "greeting",
|
||||
"greeting_text": "Hello Negative Age, welcome to CureSelect Healthcare. Could you please share what health symptoms you are experiencing today?",
|
||||
"audio_url": "/v1/voice-onboarding/audio/aud_dcfc46c7ddb6",
|
||||
"response_time_ms": 36.78,
|
||||
"response_time_sec": 0.037
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "BND-002",
|
||||
"category": "Boundary / Buffer Overflow",
|
||||
"name": "Extremely Long String Payload (5,000 char name)",
|
||||
"endpoint": "POST /v1/voice-onboarding/start",
|
||||
"status_code": 200,
|
||||
"passed": true,
|
||||
"response_time_ms": 32.56
|
||||
},
|
||||
{
|
||||
"id": "WKF-001",
|
||||
"category": "Workflow / Invalid Session",
|
||||
"name": "Submit Turn to Non-Existent Session ID",
|
||||
"endpoint": "POST /v1/voice-onboarding/INVALID-SESSION-99999/turn",
|
||||
"status_code": 404,
|
||||
"passed": true,
|
||||
"response": {
|
||||
"detail": "Voice onboarding session not found"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "WKF-002",
|
||||
"category": "Workflow / Invalid Session",
|
||||
"name": "Complete Non-Existent Session ID",
|
||||
"endpoint": "POST /v1/voice-onboarding/INVALID-SESSION-99999/complete",
|
||||
"status_code": 404,
|
||||
"passed": true,
|
||||
"response": {
|
||||
"detail": "Voice onboarding session not found"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "WKF-003",
|
||||
"category": "Workflow / Audio Fallback",
|
||||
"name": "Fetch Non-Existent Audio ID (Fallback wav test)",
|
||||
"endpoint": "GET /v1/voice-onboarding/audio/aud_NON_EXISTENT_9999",
|
||||
"status_code": 200,
|
||||
"passed": true,
|
||||
"response": "Binary Data (8044 bytes, Content-Type: audio/wav)"
|
||||
},
|
||||
{
|
||||
"id": "CON-001",
|
||||
"category": "Concurrency / Race Condition",
|
||||
"name": "5 Simultaneous Parallel Turn Submissions on Same Session",
|
||||
"endpoint": "POST /v1/voice-onboarding/VOICE-F89E1A28/turn",
|
||||
"parallel_status_codes": [
|
||||
200,
|
||||
200,
|
||||
200,
|
||||
200,
|
||||
200
|
||||
],
|
||||
"passed": true,
|
||||
"total_latency_ms": 2491.33
|
||||
},
|
||||
{
|
||||
"id": "TXT-001",
|
||||
"category": "Text API / Start",
|
||||
"name": "POST /v1/onboarding/start Session Creation",
|
||||
"endpoint": "POST /v1/onboarding/start",
|
||||
"status_code": 200,
|
||||
"passed": true,
|
||||
"response": {
|
||||
"success": true,
|
||||
"session_id": "ONB-F2C02D0C",
|
||||
"patient_id": "PAT-TXT-001",
|
||||
"category": {
|
||||
"type": "general",
|
||||
"code": "general_medicine",
|
||||
"name": "General Medicine"
|
||||
},
|
||||
"language": "en",
|
||||
"status": "in_progress",
|
||||
"stage": "greeting",
|
||||
"message": "Hello Text Patient, welcome to CureSelect Healthcare. Could you please share what health symptoms you are experiencing today?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "TXT-002",
|
||||
"category": "Text API / Message",
|
||||
"name": "POST /v1/onboarding/{session_id}/message Turn Submission",
|
||||
"endpoint": "POST /v1/onboarding/ONB-F2C02D0C/message",
|
||||
"status_code": 200,
|
||||
"passed": true,
|
||||
"response": {
|
||||
"success": true,
|
||||
"session_id": "ONB-F2C02D0C",
|
||||
"stage": "reason_for_visit",
|
||||
"message": "Got it. How long has this issue been bothering you?",
|
||||
"status": "in_progress"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "TXT-003",
|
||||
"category": "Text API / Complete",
|
||||
"name": "POST /v1/onboarding/{session_id}/complete EHR Extraction",
|
||||
"endpoint": "POST /v1/onboarding/ONB-F2C02D0C/complete",
|
||||
"status_code": 200,
|
||||
"passed": true,
|
||||
"response": {
|
||||
"success": true,
|
||||
"session_id": "ONB-F2C02D0C",
|
||||
"status": "submitted_and_cleaned",
|
||||
"result": {
|
||||
"patient_id": "PAT-TXT-001",
|
||||
"abha_id": null,
|
||||
"phone": null,
|
||||
"insurance_scheme": null,
|
||||
"category": {
|
||||
"type": "general",
|
||||
"code": "general_medicine",
|
||||
"name": "General Medicine"
|
||||
},
|
||||
"chief_complaint": "Severe migraine and nauseated feeling",
|
||||
"symptoms": [
|
||||
{
|
||||
"name": "Severe migraine",
|
||||
"duration": null,
|
||||
"severity": "severe",
|
||||
"description": null
|
||||
},
|
||||
{
|
||||
"name": "Nausea",
|
||||
"duration": null,
|
||||
"severity": null,
|
||||
"description": "Nauseated feeling"
|
||||
}
|
||||
],
|
||||
"medical_history": [],
|
||||
"medications": [],
|
||||
"allergies": [],
|
||||
"dietary_habits": null,
|
||||
"additional_information": null,
|
||||
"language": "en",
|
||||
"onboarding_completed": false
|
||||
},
|
||||
"message": "Onboarding successfully completed, saved to patient record, and temporary session cleaned.",
|
||||
"response_time_ms": null,
|
||||
"response_time_sec": null
|
||||
}
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user