Skip to content

Conversation

@Napalys
Copy link
Contributor

@Napalys Napalys commented Mar 28, 2025

The following pull request introduces modeling for previously missing fs-extra functions.

@Napalys Napalys force-pushed the js/fs-extra-missing branch from e45edc5 to 769fe75 Compare March 28, 2025 12:07
@Napalys Napalys marked this pull request as ready for review March 28, 2025 12:10
Copilot AI review requested due to automatic review settings March 28, 2025 12:10
@Napalys Napalys requested a review from a team as a code owner March 28, 2025 12:10
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 introduces modeling for previously missing fs-extra functions in our security queries.

  • Adds additional fs-extra functions as sinks in HTTP-to-file and file-to-HTTP security tests.
  • Expands test coverage for CWE-912, CWE-200, and CWE-022 cases using various fs and fs-extra methods.
  • Updates change notes to document the new fs-extra method support.

Reviewed Changes

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

File Description
javascript/ql/test/query-tests/Security/CWE-912/HttpToFileAccess.js Integrates new fs-extra functions (open, writev, writevSync) in HTTP-based file access tests.
javascript/ql/test/query-tests/Security/CWE-200/FileAccessToHttp.js Adds file operations using readvSync and readv to simulate file access leading to HTTP alerts.
javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/more-fs-extra.js Models a variety of fs-extra methods as potential sinks in tainted path scenarios.
javascript/ql/lib/change-notes/2025-03-28-fs-extra.md Documents the introduction of additional fs-extra method support.
Files not reviewed (4)
  • javascript/ql/lib/semmle/javascript/frameworks/NodeJSLib.qll: Language not supported
  • javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/TaintedPath.expected: Language not supported
  • javascript/ql/test/query-tests/Security/CWE-200/FileAccessToHttp.expected: Language not supported
  • javascript/ql/test/query-tests/Security/CWE-912/HttpToFileAccess.expected: Language not supported

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

@Napalys Napalys merged commit 4572376 into github:main Mar 31, 2025
14 checks passed
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.

2 participants