Skip to content

Simple Python HOF does not get detected #500

@dimitris-m

Description

@dimitris-m

There is no detection on this example:

─────┬───────────────────────────────────────────────────────
     │ File: simple-hof.py                                   
─────┼───────────────────────────────────────────────────────
   1def f(x):                                             
   2z = source(x)                                     
   3# ruleid: taint-call                              
   4 │     (lambda k: sink(k))(z)                            
─────┴───────────────────────────────────────────────────────
─────┬───────────────────────────────────────────────────────
     │ File: simple-hof.yaml                                 
─────┼───────────────────────────────────────────────────────
   1rules:                                                
   2- id: taint-call                                    
   3message: Test HOF callback taint propagation      
   4languages:                                        
   5- python                                        
   6severity: WARNING                                 
   7mode: taint                                       
   8options:                                          
   9taint_intrafile: true                           
  10pattern-sources:                                  
  11- pattern: source(...)                          
  12pattern-sinks:                                    
  13- pattern: sink(...)                            
  14 │                                                       
─────┴───────────────────────────────────────────────────────

Metadata

Metadata

Labels

bugSomething isn't workinghofissues related to higher-order functions and lambdas

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions