Skip to content

Conversation

@alexet
Copy link

@alexet alexet commented Mar 4, 2025

The disjunction mentions request on one side and requestNode on the other. This means that the disjunction can't go first and the call the the charpred must be done first. Due to a inline_late bindingset[...] call inside the inlined new.getReturn(_) we can't start with that inside the disjunct and we therefore must choose a CP. Luckily in most databases the CP ends up small but it messes up the normal CP detection heuristics as all the CPs are weighted equally.

@github-actions github-actions bot added the Ruby label Mar 4, 2025
@alexet alexet marked this pull request as ready for review April 29, 2025 17:41
Copilot AI review requested due to automatic review settings April 29, 2025 17:41
@alexet alexet requested a review from a team as a code owner April 29, 2025 17:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request refactors the URL part extraction in a Net::HTTP request to avoid a forced CP by extracting the inline logic into a dedicated helper predicate.

  • Moved inline URL part extraction to a new helper function
  • Added documentation for the helper predicate to clarify its purpose
Comments suppressed due to low confidence (1)

ruby/ql/lib/codeql/ruby/frameworks/http_clients/NetHttp.qll:67

  • [nitpick] Consider renaming the variable 'new' to something more descriptive to avoid potential confusion with object instantiation keywords.
new = API::getTopLevelMember("Net").getMember("HTTP").getInstance() and

@hvitved hvitved added the no-change-note-required This PR does not need a change note label Apr 29, 2025
@alexet alexet closed this Nov 6, 2025
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.

3 participants