Sitelet https://web.archive.org/web/20260329171137/https://github.com/github/codeql/pull/11397
Skip to content

Rb: use instanceof instead of extends on DataFlow::CallNode in some case#11397

Merged
erik-krogh merged 2 commits intogithub:mainfrom
erik-krogh:call-instanceof
Nov 23, 2022
Merged

Rb: use instanceof instead of extends on DataFlow::CallNode in some case#11397
erik-krogh merged 2 commits intogithub:mainfrom
erik-krogh:call-instanceof

Conversation

@erik-krogh
Copy link
Copy Markdown
Contributor

@erik-krogh erik-krogh commented Nov 23, 2022 •

I noticed an override DataFlow::Node getAnArgument in classes that extends DataFlow::CallNode.
That is just a foot-gun waiting to happen if DataFlow::CallNode gets an getAnArgument predicate, so I changed those classes to instanceof DataFlow::CallNode.

Drive-by cleanup of imports in Open3.qll based on feedback from QL-for-QL.

@github-actions github-actions bot added the Ruby label Nov 23, 2022
@erik-krogh erik-krogh marked this pull request as ready for review November 23, 2022 14:27
@erik-krogh erik-krogh requested a review from a team as a code owner November 23, 2022 14:27
Copy link
Copy Markdown
Contributor

@hvitved hvitved left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Let's do a DCA run before merging.

@erik-krogh erik-krogh added the no-change-note-required This PR does not need a change note label Nov 23, 2022
@erik-krogh
Copy link
Copy Markdown
Contributor Author

@erik-krogh erik-krogh merged commit 3d4f64f into github:main Nov 23, 2022
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.

2 participants