mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
Ruby: Model remote input for ActionMailbox
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
processMethods
|
||||
| action_mailbox.rb:2:3:5:5 | process |
|
||||
| action_mailbox.rb:13:5:15:7 | process |
|
||||
messageInstances
|
||||
| action_mailbox.rb:3:5:3:8 | call to mail |
|
||||
| action_mailbox.rb:4:5:4:8 | call to mail |
|
||||
| action_mailbox.rb:8:5:8:8 | call to mail |
|
||||
| action_mailbox.rb:14:9:14:12 | call to mail |
|
||||
remoteContent
|
||||
| action_mailbox.rb:3:5:3:13 | call to body |
|
||||
| action_mailbox.rb:4:5:4:11 | call to to |
|
||||
| action_mailbox.rb:8:5:8:18 | call to text_part |
|
||||
| action_mailbox.rb:14:9:14:23 | call to raw_source |
|
||||
@@ -0,0 +1,8 @@
|
||||
private import codeql.ruby.frameworks.ActionMailbox
|
||||
private import codeql.ruby.DataFlow
|
||||
|
||||
query predicate processMethods(ActionMailbox::Process p) { any() }
|
||||
|
||||
query predicate messageInstances(ActionMailbox::Mail::Message c) { any() }
|
||||
|
||||
query predicate remoteContent(ActionMailbox::Mail::RemoteContent r) { any() }
|
||||
@@ -0,0 +1,22 @@
|
||||
class A < ActionMailbox::Base
|
||||
def process
|
||||
mail.body
|
||||
mail.to
|
||||
end
|
||||
|
||||
def other_method
|
||||
mail.text_part
|
||||
end
|
||||
end
|
||||
|
||||
class B < A
|
||||
def process
|
||||
mail.raw_source
|
||||
end
|
||||
end
|
||||
|
||||
class C # not a mailbox class
|
||||
def process
|
||||
mail.subject
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user