test(python): add missing ResolveLoopsTest for loop-based crypto variable resolution#471
Open
vishnudathks wants to merge 3 commits into
Open
test(python): add missing ResolveLoopsTest for loop-based crypto variable resolution#471vishnudathks wants to merge 3 commits into
vishnudathks wants to merge 3 commits into
Conversation
…p resolution Signed-off-by: vishnudathks <vishnudathks5@gmail.com>
There was a problem hiding this comment.
Pull request overview
Adds missing test coverage for loop-based crypto variable resolution in the Python ruleset by introducing a JUnit test runner for an existing test resource and aligning expected “Noncompliant” messages with current engine behavior.
Changes:
- Added
ResolveLoopsTestto executeResolveLoopsTestFile.pyviaPythonCheckVerifier. - Updated
ResolveLoopsTestFile.pyexpectations forfor/whileloop resolution to match current resolution limitations.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
python/src/test/java/com/ibm/plugin/rules/resolve/ResolveLoopsTest.java |
New JUnit test class that runs the loop-resolution Python test file using the existing resolve rule set. |
python/src/test/files/rules/resolve/ResolveLoopsTestFile.py |
Adjusts expected issue messages in loop scenarios to reflect current resolver output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…view feedback Signed-off-by: vishnudathks <vishnudathks5@gmail.com>
Signed-off-by: vishnudathks <vishnudathks5@gmail.com>
Contributor
Author
|
Hi @san-zrl, I've addressed all the review feedback. Could you take another look when you get a chance? I've also submitted my LFX application for the CBOMkit mentorship and would love to show continued progress. |
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.
Summary
ResolveLoopsTestFile.pyexisted in test resources but had no correspondingJava test class to execute it. Loop-based crypto variable resolution
(both
forandwhileloops) was completely untested.Changes
ResolveLoopsTest.javafollowing the same pattern as other resolvetests (
ResolveAliasImportTest,ResolveScopeValuesTest, etc.)ResolveLoopsTestFile.pyNoncompliant comments to reflectcurrent engine behavior (for-loop iterator variable is not fully resolved)
Note
The test reveals a current engine limitation: when iterating a list of
crypto objects in a for-loop, the engine detects the iterator variable
name (
curve) instead of the resolved values. This is tracked separately.Testing
All modules pass with
mvn clean package— BUILD SUCCESS.