You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request introduces several improvements to both backend and frontend code, primarily focused on enhancing the handling and exposure of resource metadata and details in findings, as well as refactoring test assertions for better clarity and consistency. The most important changes are summarized below.
Backend: Resource metadata and details exposure
api/v1/serializers.py: Added the metadata field to the ResourceSerializer's fields and set it as read-only, ensuring resource metadata is included in API responses.
test_views.py: Added a new test (test_findings_retrieve_include_resource_metadata) to verify that resource metadata and details are correctly included in the findings API response.
Frontend: Resource metadata and details support
findings-by-resource.adapter.ts: Updated the ResourceDrawerFinding interface and the adapter to include resourceDetails and resourceMetadata fields, ensuring these attributes are available in the UI. [1][2]
Ensure new entries are added to CHANGELOG.md, if applicable.
SDK/CLI
Are there new checks included in this PR? Yes / No
If so, do we need to update permissions for the provider? Please review this carefully.
UI
All issue/task requirements work as expected on the UI
If this PR adds or updates npm dependencies, include package-health evidence (maintenance, popularity, known vulnerabilities, license, release age) and explain why existing/native alternatives are insufficient.
Screenshots/Video of the functionality flow (if applicable) - Mobile (X < 640px)
Screenshots/Video of the functionality flow (if applicable) - Table (640px > X < 1024px)
Screenshots/Video of the functionality flow (if applicable) - Desktop (X > 1024px)
Ensure new entries are added to CHANGELOG.md, if applicable.
API
All issue/task requirements work as expected on the API
Endpoint response output (if applicable)
EXPLAIN ANALYZE output for new/modified queries or indexes (if applicable)
Performance test results (if applicable)
Any other relevant evidence of the implementation (if applicable)
Verify if API specs need to be regenerated.
Check if version updates are required (e.g., specs, uv, etc.).
Ensure new entries are added to CHANGELOG.md, if applicable.
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.65%. Comparing base (3410fc9) to head (666be8c). ⚠️ Report is 6 commits behind head on master.
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
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.
Description
Screen.Recording.2026-05-15.at.13.38.52.mov
This pull request introduces several improvements to both backend and frontend code, primarily focused on enhancing the handling and exposure of resource metadata and details in findings, as well as refactoring test assertions for better clarity and consistency. The most important changes are summarized below.
Backend: Resource metadata and details exposure
api/v1/serializers.py: Added themetadatafield to theResourceSerializer'sfieldsand set it as read-only, ensuring resource metadata is included in API responses.test_views.py: Added a new test (test_findings_retrieve_include_resource_metadata) to verify that resource metadata and details are correctly included in the findings API response.Frontend: Resource metadata and details support
findings-by-resource.adapter.ts: Updated theResourceDrawerFindinginterface and the adapter to includeresourceDetailsandresourceMetadatafields, ensuring these attributes are available in the UI. [1] [2]findings-by-resource.adapter.test.ts: Added tests to verify extraction and defaulting behavior for resource metadata and details.resource-detail-drawer-content.test.tsx: Updated mock data to include the new fields and added support for JSON code highlighting. [1] [2]Testing and code quality improvements
test_views.py: Refactored multiple test assertions to use a single-lineassertstatement with an error message, improving readability and consistency across the test suite. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]These changes improve the API's expressiveness, ensure the UI can display additional resource context, and make the codebase more maintainable.
Steps to review
Please add a detailed description of how to review this PR.
Checklist
Community Checklist
SDK/CLI
UI
API
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.