File tree Expand file tree Collapse file tree
ruby/ql/lib/codeql/ruby/frameworks/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,6 +90,9 @@ module Gem {
9090 result = this .getAPublicModule ( ) .getStmt ( _) .( SingletonClass )
9191 }
9292
93+ /** Holds if this gem is vendored in this codebase. */
94+ predicate isVendored ( ) { File .super .getParentContainer + ( ) .getBaseName ( ) = "vendor" }
95+
9396 /** Gets a parameter from an exported method, which is an input to this gem. */
9497 DataFlow:: ParameterNode getAnInputParameter ( ) {
9598 exists ( MethodBase method |
@@ -107,6 +110,7 @@ module Gem {
107110 DataFlow:: ParameterNode getALibraryInput ( ) {
108111 exists ( GemSpec spec |
109112 exists ( spec .getName ( ) ) and // we only consider `.gemspec` files that have a name
113+ not spec .isVendored ( ) and // if the gem is vendored its parameters are not external inputs
110114 result = spec .getAnInputParameter ( )
111115 )
112116 }
You can’t perform that action at this time.
0 commit comments