MCPcopy Create free account
hub / github.com/erans/pgsqlite / test_sensitive_table_access

Function test_sensitive_table_access

src/security/sql_injection_detector.rs:600–610  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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}

Callers

nothing calls this directly

Calls 1

analyze_queryMethod · 0.45

Tested by

no test coverage detected