@@ -269,33 +269,32 @@ impl Detector {
269269 if let Some ( last_seg) = expanded. last ( )
270270 && extern_fn_names. contains ( last_seg. as_str ( ) )
271271 {
272- let deny_violation =
273- is_category_denied ( & effective_deny, & Category :: Ffi ) ;
274- findings. push ( Finding {
275- file : file. path . clone ( ) ,
276- function : func. name . clone ( ) ,
277- function_line : func. line ,
278- call_line : call. line ,
279- call_col : call. col ,
280- call_text : expanded. join ( "::" ) ,
281- category : Category :: Ffi ,
282- subcategory : "ffi_call" . to_string ( ) ,
283- risk : if deny_violation {
284- Risk :: Critical
285- } else {
286- Risk :: High
287- } ,
288- description : if deny_violation {
289- format ! ( "DENY VIOLATION: Calls FFI function {}()" , last_seg)
290- } else {
291- format ! ( "Calls FFI function {}()" , last_seg)
292- } ,
293- is_build_script : func. is_build_script ,
294- crate_name : crate_name. to_string ( ) ,
295- crate_version : crate_version. to_string ( ) ,
296- is_deny_violation : deny_violation,
297- is_transitive : false ,
298- } ) ;
272+ let deny_violation = is_category_denied ( & effective_deny, & Category :: Ffi ) ;
273+ findings. push ( Finding {
274+ file : file. path . clone ( ) ,
275+ function : func. name . clone ( ) ,
276+ function_line : func. line ,
277+ call_line : call. line ,
278+ call_col : call. col ,
279+ call_text : expanded. join ( "::" ) ,
280+ category : Category :: Ffi ,
281+ subcategory : "ffi_call" . to_string ( ) ,
282+ risk : if deny_violation {
283+ Risk :: Critical
284+ } else {
285+ Risk :: High
286+ } ,
287+ description : if deny_violation {
288+ format ! ( "DENY VIOLATION: Calls FFI function {}()" , last_seg)
289+ } else {
290+ format ! ( "Calls FFI function {}()" , last_seg)
291+ } ,
292+ is_build_script : func. is_build_script ,
293+ crate_name : crate_name. to_string ( ) ,
294+ crate_version : crate_version. to_string ( ) ,
295+ is_deny_violation : deny_violation,
296+ is_transitive : false ,
297+ } ) ;
299298 }
300299 }
301300 }
0 commit comments