Skip to content

Ruby: Exclude calls with arguments from OrmFieldAsSource #15847

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 1 commit into from
Mar 8, 2024

Conversation

hvitved
Copy link
Contributor

@hvitved hvitved commented Mar 7, 2024

No description provided.

@github-actions github-actions bot added the Ruby label Mar 7, 2024
@hvitved hvitved added the no-change-note-required This PR does not need a change note label Mar 8, 2024
@hvitved hvitved marked this pull request as ready for review March 8, 2024 07:28
@hvitved hvitved requested a review from a team as a code owner March 8, 2024 07:28
subSrc.(OrmInstantiation).methodCallMayAccessField(this.getMethodName())
subSrc.(OrmInstantiation).methodCallMayAccessField(this.getMethodName()) and
this.getNumberOfArguments() = 0 and
not exists(this.getBlock())
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it help to add this instead to OrmTracking::Config::isSink above? Then I would hope we would prune the dataflow graph earlier.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah no hang on, that doesn't make sense, because the dataflow graph stops at the receiver anyway. Ignore me.

@hvitved hvitved merged commit 9ee2314 into github:main Mar 8, 2024
@hvitved hvitved deleted the ruby/orm-field-as-source-no-args branch March 8, 2024 12:52
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