Option to filter Vulnerable and Non Vulnerable Packages
Implement vulnerable package filtering functionality in package search
Fixes : #1759
Feature Added:
- Vulnerable package filtering in package search
- Ability to filter packages as vulnerable-only, non-vulnerable-only, or all packages
Changes Made:
- Updated PackageSearch view in views.py
- Modified PackageSearchForm in forms.py
- Updated packages.html template with dropdown for vulnerability filtering
- Updated PackageV2ViewSet view in api_v2.py
Feature Added:
- Vulnerable package filtering in package search
- Ability to filter packages as vulnerable-only, non-vulnerable-only, or all packages
Tests Added:
- Added test in test_api_v2.py and test_view.py to test the filter.
Signed-off-by: Rishi Garg [email protected]
Hi @TG1999 , please review this Pull request.
@Rishi-source your code change and PR description do not add up, these things are nowhere to be found in the diff.
Tests Added:
- test_package_search_vulnerable_only_filter in PackageSearchTestCase
- Validates creation of vulnerable and non-vulnerable packages
- Checks vulnerability relationship creation
Changes Made:
- Updated PackageSearch view in views.py
- Modified PackageSearchForm in forms.py
- Updated packages.html template with dropdown for vulnerability filtering
- Added JavaScript to handle URL parameter updates for vulnerability filter
the tests are not added because first I want to get the implementation to get reviewed .previously they where added but Apologies for not removing the test part from the description after I have removed them from the code changes.
I’ll update the description I have changed the code in the PR but forgotten to change the previous description
@keshav-space I have addressed the review points and I have added tests can you please review the changes again and let me know if any other thing is needed.