()
| 598 | |
| 599 | #[test] |
| 600 | fn test_sensitive_table_access() { |
| 601 | let detector = SqlInjectionDetector::new(); |
| 602 | |
| 603 | // Simple access should be OK |
| 604 | let result = detector.analyze_query("SELECT * FROM pg_tables"); |
| 605 | assert!(result.is_ok()); |
| 606 | |
| 607 | // Complex access should be suspicious |
| 608 | let result = detector.analyze_query("SELECT * FROM users UNION SELECT * FROM pg_user"); |
| 609 | assert!(result.is_err()); |
| 610 | } |
| 611 | } |
nothing calls this directly
no test coverage detected