-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Java, Ruby: add missing .qlref tests #19888
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
Conversation
There was a problem hiding this 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 PR adds missing .qlref test configurations for two queries:
- Converts the Java
ArbitraryApkInstallationtest to use a.qlreffile and updates inline expectation markers. - Adds a new Ruby
.qlreftest for themeta/TaintedNodesquery (including its test source and expected output).
Reviewed Changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| java/ql/test/query-tests/security/CWE-094/ApkInstallationTest/options | Adds extractor options needed to compile the test. |
| java/ql/test/query-tests/security/CWE-094/ApkInstallationTest/ApkInstallationTest.qlref | Introduces .qlref for the ArbitraryApkInstallation query. |
| java/ql/test/query-tests/security/CWE-094/ApkInstallationTest/ApkInstallationTest.expected | Provides expected results for the converted test. |
| java/ql/test/query-tests/security/CWE-094/ApkInstallationTest/ApkInstallation.java | Updates inline tags from hasApkInstallation to Alert. |
| ruby/ql/test/query-tests/meta/TaintedNodes/tainted_path.rb | Adds the Ruby test source for the TaintedNodes query. |
| ruby/ql/test/query-tests/meta/TaintedNodes/TaintedNodes.qlref | Introduces .qlref for the TaintedNodes query. |
| ruby/ql/test/query-tests/meta/TaintedNodes/TaintedNodes.expected | Defines expected taint-alert locations in the test. |
| def require_relative() | ||
| path = ActiveStorage::Filename.new(params[:path]) # $ Alert |
Copilot
AI
Jun 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The require_relative method is defined without a path parameter but calls super(path). Update the signature to def require_relative(path) to match the super call.
| def require_relative() | |
| path = ActiveStorage::Filename.new(params[:path]) # $ Alert | |
| def require_relative(path) |
owen-mc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻 Java
Two non-
$lang-code-scanning.qlsqueries (therefore out of scope of previous PRs) have already been made diff-informed but without a .qlref test (in order to run tests with the--check-diff-informedconsistency check they need to be in .qlref form). This PR adds those tests.