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

Method analyze_select_item

src/security/sql_injection_detector.rs:235–258  ·  view source on GitHub ↗
(
        &self,
        item: &SelectItem,
        analysis: &mut SqlAnalysisResult,
        depth: usize,
        original_query: &str
    )

Source from the content-addressed store, hash-verified

233 }
234
235 fn analyze_select_item(
236 &self,
237 item: &SelectItem,
238 analysis: &mut SqlAnalysisResult,
239 depth: usize,
240 original_query: &str
241 ) -> Result<(), PgSqliteError> {
242 match item {
243 SelectItem::UnnamedExpr(expr) => {
244 self.analyze_expression(expr, analysis, depth, original_query)?;
245 }
246 SelectItem::ExprWithAlias { expr, .. } => {
247 self.analyze_expression(expr, analysis, depth, original_query)?;
248 }
249 SelectItem::QualifiedWildcard(_, _) => {
250 // Check for suspicious wildcard usage
251 }
252 SelectItem::Wildcard(_) => {
253 // Wildcard is generally OK but note it
254 analysis.has_wildcards = true;
255 }
256 }
257 Ok(())
258 }
259
260 fn analyze_table_factor(
261 &self,

Callers 1

Calls 1

analyze_expressionMethod · 0.80

Tested by

no test coverage detected