Skip to content

Ruby: Call-context sensitivity for singleton method calls #10917

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 1, 2022

Conversation

hvitved
Copy link
Contributor

@hvitved hvitved commented Oct 21, 2022

The equivalent of #10358, but for singleton methods instead of instance methods. For example, in

class A
  def self.singleton_method1 x
    sink x
  end

  def self.singleton_method2 x
    singleton_method1 x
  end
end

class B < A
  def self.singleton_method1 x
    non_sink x
  end
end

B.singleton_method2 taint

we will no longer report flow from taint to sink (but still to non_sink).

@github-actions github-actions bot added the Ruby label Oct 21, 2022
@hvitved hvitved force-pushed the ruby/singleton-call-sensitivity branch from 2dda266 to 89c83de Compare October 21, 2022 07:37
@hvitved hvitved force-pushed the ruby/singleton-call-sensitivity branch from 89c83de to 4422327 Compare October 21, 2022 09:48
@hvitved hvitved added the no-change-note-required This PR does not need a change note label Oct 21, 2022
@hvitved hvitved marked this pull request as ready for review October 21, 2022 10:00
@hvitved hvitved requested a review from a team as a code owner October 21, 2022 10:00
@calumgrant calumgrant requested a review from aibaars October 24, 2022 08:29
@hvitved hvitved merged commit e8f9429 into github:main Nov 1, 2022
@hvitved hvitved deleted the ruby/singleton-call-sensitivity branch November 1, 2022 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-change-note-required This PR does not need a change note Ruby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants