Skip to content

Commit

Permalink
Ruby: Exclude calls with arguments from OrmFieldAsSource
Browse files Browse the repository at this point in the history
  • Loading branch information
hvitved committed Mar 7, 2024
1 parent 67612e6 commit 85782ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ruby/ql/lib/codeql/ruby/security/XSS.qll
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,9 @@ module StoredXss {
OrmFieldAsSource() {
exists(DataFlow::CallNode subSrc |
OrmTracking::flow(subSrc, this.getReceiver()) and
subSrc.(OrmInstantiation).methodCallMayAccessField(this.getMethodName())
subSrc.(OrmInstantiation).methodCallMayAccessField(this.getMethodName()) and
this.getNumberOfArguments() = 0 and
not exists(this.getBlock())
)
}
}
Expand Down

0 comments on commit 85782ff

Please sign in to comment.