Skip to content

JS: ClientRequests Axios Instance support #19655

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

GeekMasher
Copy link
Member

I've added support for creation Axios instances using create({ ... })

@Copilot Copilot AI review requested due to automatic review settings June 3, 2025 15:03
@GeekMasher GeekMasher requested a review from a team as a code owner June 3, 2025 15:03
Copy link
Contributor

@Copilot 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

Adds support for Axios instances in the ClientRequests framework and updates tests accordingly.

  • Introduces a new test file (axios.ts) that uses axios.create({ ... }) and exercises .get and .patch calls.
  • Updates the expected outputs (ClientRequests.expected) to include those new axios instance calls.
  • Extends the QL library (ClientRequests.qll) with a new AxiosInstanceRequest class and adds support for the patch method.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
javascript/ql/test/library-tests/frameworks/ClientRequests/axios.ts Added tests for axios instances and their .get / .patch calls
javascript/ql/test/library-tests/frameworks/ClientRequests/ClientRequests.expected Updated expected results to include axios.ts calls
javascript/ql/lib/semmle/javascript/frameworks/ClientRequests.qll Added handling for axios instances and included patch method
javascript/ql/lib/change-notes/2025-06-03-axios-instance-support.md Documented the new axios instance support
Comments suppressed due to low confidence (1)

javascript/ql/test/library-tests/frameworks/ClientRequests/axios.ts:24

  • [nitpick] The function is named updateUser but it actually patches a repository endpoint. Consider renaming it to updateRepo (or adjust the endpoint if it should update a user).
export async function updateUser(owner: string, repo: string, data: any) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant