fix: accept legacy metadata from db#10408
Conversation
|
Please add an entry to the corresponding |
|
✅ Conflict Markers Resolved All conflict markers have been successfully resolved in this pull request. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10408 +/- ##
==========================================
- Coverage 93.38% 88.52% -4.86%
==========================================
Files 219 313 +94
Lines 30398 37103 +6705
==========================================
+ Hits 28386 32845 +4459
- Misses 2012 4258 +2246
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
🔒 Container Security ScanImage: 📊 Vulnerability Summary
4 package(s) affected
|
🔒 Container Security ScanImage: 📊 Vulnerability Summary
4 package(s) affected
|
|
Please, do not merge this PR, we are waiting to see if the validators error happen again or it was a problem that occured just for scans that started before the release and finished after it. |
Context
scan-reportcould fail when generating outputs for historical findings stored with legacycheck_metadatavalues that no longer pass currentCheckMetadatavalidation rules. This was affecting old persisted Azure findings during report generation, even though current metadata files in the repo are valid.Description
This PR makes
Finding.transform_api_finding()tolerate legacy persisted check metadata used in DB-backed findings during output generation. It keeps normal validation for current metadata, but falls back to a compatibility path for historical rows that fail validation so report generation does not crash.It also adds regression coverage for:
transform_api_finding()generate_outputs_taskpath using legacy persisted check metadataSteps to review
Test with a DB with old findings if this fix the issue.
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.