Java, Ruby: add missing .qlref tests#19888
Merged
d10c merged 2 commits intogithub:mainfrom Jun 27, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
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. |
Comment on lines
+89
to
+90
| def require_relative() | ||
| path = ActiveStorage::Filename.new(params[:path]) # $ Alert |
There was a problem hiding this comment.
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.
Suggested change
| def require_relative() | |
| path = ActiveStorage::Filename.new(params[:path]) # $ Alert | |
| def require_relative(path) |
hvitved
approved these changes
Jun 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.