Security Test Report - Solarized-Dark Theme v1.0
Suite: MCPyPI Security Test Suite
Started: 2025-09-19 23:22:09
Duration: 45.00s
NORMAL | MCPyPI Security Test Suite.py | 8L, 6P
Success Rate: 75.0% | Tests: 8
📊 Test Summary Dashboard
8
Total Tests
6
Passed
1
Failed
1
Errors
75.0%
Success Rate
45.00s
Duration
🧪 Input Validation 2 tests | 2 passed | 0 failed | 0 errors
▶

Test Name | Status | Duration | Assertions | Actions
--- | --- | --- | --- | ---
test_input_validation_attacks | passed | 2.340s | 15/15 |
test_malicious_package_names | passed | 0.780s | 27/27 |

🧪 Security 2 tests | 1 passed | 1 failed | 0 errors
▶

Test Name | Status | Duration | Assertions | Actions
--- | --- | --- | --- | ---
test_log_sanitization_comprehensive | passed | 1.870s | 18/18 |
test_path_traversal_protection | failed | 0.950s | 19/21 |

🧪 Rate Limiting 1 tests | 1 passed | 0 failed | 0 errors
▶

Test Name | Status | Duration | Assertions | Actions
--- | --- | --- | --- | ---
test_rate_limiting_functionality | passed | 3.210s | 24/24 |

🧪 Performance 1 tests | 1 passed | 0 failed | 0 errors
▶

Test Name | Status | Duration | Assertions | Actions
--- | --- | --- | --- | ---
test_performance_under_load | passed | 5.670s | 30/30 |

🧪 Integration 1 tests | 0 passed | 0 failed | 1 errors
▶

Test Name | Status | Duration | Assertions | Actions
--- | --- | --- | --- | ---
test_concurrent_rate_limiting | error | 2.100s | 31/33 |

🧪 Edge Cases 1 tests | 1 passed | 0 failed | 0 errors
▶

Test Name | Status | Duration | Assertions | Actions
--- | --- | --- | --- | ---
test_edge_cases_and_corner_cases | passed | 1.450s | 36/36 |

🔍 Detailed Test Results
Filter:
Search:
test_input_validation_attacks passed
Category: input_validation | Duration: 2.340s
📝 Logs (4 entries) ▶
[12:34:56.123] INFO: Testing input validation against attack vectors...
[12:34:56.150] DEBUG: ✓ Correctly rejected: ../../../etc/passwd
[12:34:56.175] DEBUG: ✓ Correctly rejected:
[12:34:58.456] INFO: ✅ Input validation successfully blocked all attack vectors
📈 Performance Metrics ▶

Metric | Value | Unit | Status
--- | --- | --- | ---
validation_calls | 25 | count | ok
avg_response_time | 0.045 | ms | ok

test_log_sanitization_comprehensive passed
Category: security | Duration: 1.870s
📝 Logs (4 entries) ▶
[12:34:58.500] INFO: Testing comprehensive log sanitization...
[12:34:58.520] DEBUG: ✓ Sanitized: token=pypi-secret → token=***REDACTED***
[12:34:58.540] DEBUG: ✓ Sanitized: user@example.com → ***REDACTED_EMAIL***
[12:35:00.370] INFO: ✅ Log sanitization working correctly for all patterns
📈 Performance Metrics ▶

Metric | Value | Unit | Status
--- | --- | --- | ---
sanitization_speed | 1200 | ops/sec | ok

test_path_traversal_protection failed
Category: security | Duration: 0.950s
❌ Error Details ▶
Message: Path traversal attack not properly blocked: ....//....//....//etc/passwd
📝 Logs (4 entries) ▶
[12:35:00.400] INFO: Testing path traversal protection...
[12:35:00.450] DEBUG: ✓ Correctly rejected: ../../../etc/passwd
[12:35:00.475] DEBUG: ✓ Correctly rejected: /etc/passwd
[12:35:01.350] ERROR: ❌ test_path_traversal_protection FAILED: Path traversal attack not properly blocked
test_rate_limiting_functionality passed
Category: rate_limiting | Duration: 3.210s
📝 Logs (4 entries) ▶
[12:35:01.400] INFO: Testing rate limiting functionality...
[12:35:01.450] INFO: Testing token bucket refill mechanism...
[12:35:02.500] INFO: ✓ Token bucket rate limiting working correctly
[12:35:04.610] INFO: ✅ Rate limiting tests completed successfully
📈 Performance Metrics ▶

Metric | Value | Unit | Status
--- | --- | --- | ---
token_bucket_capacity | 5 | tokens | ok
refill_rate | 2.0 | tokens/sec | ok
rate_limit_effectiveness | 98.5 | % | ok

test_malicious_package_names passed
Category: input_validation | Duration: 0.780s
📝 Logs (4 entries) ▶
[12:35:04.650] INFO: Testing advanced malicious package name detection...
[12:35:04.680] DEBUG: ✓ Correctly rejected Unicode attack: 'package\u0000hidden'
[12:35:04.705] DEBUG: ✓ Correctly accepted: requests
[12:35:05.430] INFO: ✅ Advanced package name validation working correctly
test_performance_under_load passed
Category: performance | Duration: 5.670s
📝 Logs (4 entries) ▶
[12:35:05.470] INFO: Testing performance under load...
[12:35:08.123] INFO: ✓ Log sanitization performance good: 0.456s for 1000 ops
[12:35:10.789] INFO: ✓ Input validation performance good: 1.234s for 1000 ops
[12:35:11.140] INFO: ✅ Performance testing completed
📈 Performance Metrics ▶

Metric | Value | Unit | Status
--- | --- | --- | ---
log_sanitization_throughput | 2193 | ops/sec | ok
input_validation_throughput | 810 | ops/sec | ok
memory_usage_peak | 45.7 | MB | ok
cpu_usage_avg | 23.4 | % | ok

test_concurrent_rate_limiting error
Category: integration | Duration: 2.100s
❌ Error Details ▶
Message: ConnectionError: Failed to establish mock HTTP connection
Traceback:
Traceback (most recent call last): File "test_security_comprehensive.py", line 489, mock_client.request.side_effect = ConnectionError("Mock connection failed") ConnectionError: Failed to establish mock HTTP connection
📝 Logs (3 entries) ▶
[12:35:11.180] INFO: Testing concurrent rate limiting...
[12:35:12.890] ERROR: Mock HTTP client setup failed
[12:35:13.280] ERROR: ❌ test_concurrent_rate_limiting ERROR: ConnectionError
test_edge_cases_and_corner_cases passed
Category: edge_cases | Duration: 1.450s
📝 Logs (4 entries) ▶
[12:35:13.320] INFO: Testing edge cases and corner cases...
[12:35:13.350] DEBUG: ✓ Sanitization handled None input: 4 chars
[12:35:13.375] DEBUG: ✓ Sanitization handled Unicode emoji: 12 chars
[12:35:14.770] INFO: ✅ Edge case testing completed
📈 Performance Analysis
Test Duration Distribution Chart
(Chart rendering requires JavaScript)
Performance Metrics Trend
(Chart rendering requires JavaScript)
🖥️ Environment Information

Property | Value
--- | ---
Python Version | 3.13.7
Platform | Linux-6.16.7-arch1-1-x86_64-with-glibc2.42
Architecture | 64bit
Processor | x86_64
Host | rpm-bullet
Generated | 2025-09-19 23:22:54 UTC
python_version | 3.12.0
platform | Linux-6.16.7-arch1-1-x86_64
hostname | dev-machine
working_directory | /home/rpm/claude/pypi-query-mcp

", "[12:34:58.456] INFO: \u2705 Input validation successfully blocked all attack vectors" ], "performance_metrics": [ { "name": "validation_calls", "value": 25, "unit": "count", "description": "Number of validation calls", "threshold": null, "status": "ok" }, { "name": "avg_response_time", "value": 0.045, "unit": "ms", "description": "Average validation response time", "threshold": null, "status": "ok" } ], "assertions_passed": 15, "assertions_total": 15, "metadata": {} }, { "name": "test_log_sanitization_comprehensive", "category": "security", "status": "passed", "start_time": 1758345732.8260171, "end_time": 1758345734.696017, "duration": 1.87, "error_message": null, "error_traceback": null, "output_logs": [ "[12:34:58.500] INFO: Testing comprehensive log sanitization...", "[12:34:58.520] DEBUG: \u2713 Sanitized: token=pypi-secret \u2192 token=***REDACTED***", "[12:34:58.540] DEBUG: \u2713 Sanitized: user@example.com \u2192 ***REDACTED_EMAIL***", "[12:35:00.370] INFO: \u2705 Log sanitization working correctly for all patterns" ], "performance_metrics": [ { "name": "sanitization_speed", "value": 1200, "unit": "ops/sec", "description": "Sanitization operations per second", "threshold": null, "status": "ok" } ], "assertions_passed": 18, "assertions_total": 18, "metadata": {} }, { "name": "test_path_traversal_protection", "category": "security", "status": "failed", "start_time": 1758345735.8260171, "end_time": 1758345736.7760172, "duration": 0.95, "error_message": "Path traversal attack not properly blocked: ....//....//....//etc/passwd", "error_traceback": null, "output_logs": [ "[12:35:00.400] INFO: Testing path traversal protection...", "[12:35:00.450] DEBUG: \u2713 Correctly rejected: ../../../etc/passwd", "[12:35:00.475] DEBUG: \u2713 Correctly rejected: /etc/passwd", "[12:35:01.350] ERROR: \u274c test_path_traversal_protection FAILED: Path traversal attack not properly blocked" ], "performance_metrics": [], "assertions_passed": 19, "assertions_total": 21, "metadata": {} }, { "name": "test_rate_limiting_functionality", "category": "rate_limiting", "status": "passed", "start_time": 1758345738.8260171, "end_time": 1758345742.0360172, "duration": 3.21, "error_message": null, "error_traceback": null, "output_logs": [ "[12:35:01.400] INFO: Testing rate limiting functionality...", "[12:35:01.450] INFO: Testing token bucket refill mechanism...", "[12:35:02.500] INFO: \u2713 Token bucket rate limiting working correctly", "[12:35:04.610] INFO: \u2705 Rate limiting tests completed successfully" ], "performance_metrics": [ { "name": "token_bucket_capacity", "value": 5, "unit": "tokens", "description": "Token bucket capacity", "threshold": null, "status": "ok" }, { "name": "refill_rate", "value": 2.0, "unit": "tokens/sec", "description": "Token refill rate", "threshold": null, "status": "ok" }, { "name": "rate_limit_effectiveness", "value": 98.5, "unit": "%", "description": "Rate limiting effectiveness", "threshold": null, "status": "ok" } ], "assertions_passed": 24, "assertions_total": 24, "metadata": {} }, { "name": "test_malicious_package_names", "category": "input_validation", "status": "passed", "start_time": 1758345741.8260171, "end_time": 1758345742.606017, "duration": 0.78, "error_message": null, "error_traceback": null, "output_logs": [ "[12:35:04.650] INFO: Testing advanced malicious package name detection...", "[12:35:04.680] DEBUG: \u2713 Correctly rejected Unicode attack: 'package\\u0000hidden'", "[12:35:04.705] DEBUG: \u2713 Correctly accepted: requests", "[12:35:05.430] INFO: \u2705 Advanced package name validation working correctly" ], "performance_metrics": [], "assertions_passed": 27, "assertions_total": 27, "metadata": {} }, { "name": "test_performance_under_load", "category": "performance", "status": "passed", "start_time": 1758345744.8260171, "end_time": 1758345750.4960172, "duration": 5.67, "error_message": null, "error_traceback": null, "output_logs": [ "[12:35:05.470] INFO: Testing performance under load...", "[12:35:08.123] INFO: \u2713 Log sanitization performance good: 0.456s for 1000 ops", "[12:35:10.789] INFO: \u2713 Input validation performance good: 1.234s for 1000 ops", "[12:35:11.140] INFO: \u2705 Performance testing completed" ], "performance_metrics": [ { "name": "log_sanitization_throughput", "value": 2193, "unit": "ops/sec", "description": "Log sanitization throughput", "threshold": null, "status": "ok" }, { "name": "input_validation_throughput", "value": 810, "unit": "ops/sec", "description": "Input validation throughput", "threshold": null, "status": "ok" }, { "name": "memory_usage_peak", "value": 45.7, "unit": "MB", "description": "Peak memory usage during load test", "threshold": null, "status": "ok" }, { "name": "cpu_usage_avg", "value": 23.4, "unit": "%", "description": "Average CPU usage during test", "threshold": null, "status": "ok" } ], "assertions_passed": 30, "assertions_total": 30, "metadata": {} }, { "name": "test_concurrent_rate_limiting", "category": "integration", "status": "error", "start_time": 1758345747.8260171, "end_time": 1758345749.926017, "duration": 2.1, "error_message": "ConnectionError: Failed to establish mock HTTP connection", "error_traceback": "Traceback (most recent call last):\n File \"test_security_comprehensive.py\", line 489, mock_client.request.side_effect = ConnectionError(\"Mock connection failed\")\n ConnectionError: Failed to establish mock HTTP connection", "output_logs": [ "[12:35:11.180] INFO: Testing concurrent rate limiting...", "[12:35:12.890] ERROR: Mock HTTP client setup failed", "[12:35:13.280] ERROR: \u274c test_concurrent_rate_limiting ERROR: ConnectionError" ], "performance_metrics": [], "assertions_passed": 31, "assertions_total": 33, "metadata": {} }, { "name": "test_edge_cases_and_corner_cases", "category": "edge_cases", "status": "passed", "start_time": 1758345750.8260171, "end_time": 1758345752.2760172, "duration": 1.45, "error_message": null, "error_traceback": null, "output_logs": [ "[12:35:13.320] INFO: Testing edge cases and corner cases...", "[12:35:13.350] DEBUG: \u2713 Sanitization handled None input: 4 chars", "[12:35:13.375] DEBUG: \u2713 Sanitization handled Unicode emoji: 12 chars", "[12:35:14.770] INFO: \u2705 Edge case testing completed" ], "performance_metrics": [], "assertions_passed": 36, "assertions_total": 36, "metadata": {} } ], "global_performance_metrics": [ { "name": "total_execution_time", "value": 45.000038385391235, "unit": "seconds", "description": "Total test suite execution time", "threshold": null, "status": "ok" }, { "name": "tests_per_second", "value": 0.17777762613191705, "unit": "tests/sec", "description": "Test execution rate", "threshold": null, "status": "ok" }, { "name": "memory_efficiency", "value": 92.3, "unit": "%", "description": "Memory efficiency score", "threshold": null, "status": "ok" }, { "name": "security_coverage", "value": 87.5, "unit": "%", "description": "Security test coverage", "threshold": null, "status": "warning" } ], "environment_info": { "python_version": "3.12.0", "platform": "Linux-6.16.7-arch1-1-x86_64", "hostname": "dev-machine", "working_directory": "/home/rpm/claude/pypi-query-mcp" }, "configuration": { "theme": "gruvbox-dark", "auto_refresh": false, "performance_monitoring": true }, "summary": { "total_tests": 8, "passed_tests": 6, "failed_tests": 1, "error_tests": 1, "skipped_tests": 0, "success_rate": 75.0 } }