SnapshotDataFactoryImpl.getSnapshot(snapshotId, role, zoneId, retrieveAnySnapshotFromVolume) (used by getSnapshotWithRoleAndZone) has a stray ; in its fallback loop:
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
What happened
The threat detection engine failed to produce results.
SnapshotDataFactoryImpl.getSnapshot has a stray semicolon after the zone check in its fallback loop, so the if never applies and the first copy of the snapshot from any zone is returned. Both loops also compare long with Long, which can throw an NPE when getStoreZoneId returns null. The reporter says this came in with #7873 and is present on 4.19 onward.
📊 Assessment
Dimension
Value
Reasoning
Type
type:bug
Wrong result from a lookup that is meant to filter by zone
Component
component:snapshot
SnapshotDataFactoryImpl snapshot lookup
Severity
Severity:Minor
Only affects the fallback path; the wrong zone copy is returned, with no data loss reported
Labels
type:bug, component:snapshot, Severity:Minor
Coding agent
Suitable
Fix is specified: remove the semicolon and compare null-safely in both loops
Activity
github-actions commented on Nov 26, 2026
Warning
threat detection engine error
What happenedThe threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
The threat detection engine failed to produce results.
Review the workflow run logs for details.
🎯 Triage report
SnapshotDataFactoryImpl.getSnapshot has a stray semicolon after the zone check in its fallback loop, so the if never applies and the first copy of the snapshot from any zone is returned. Both loops also compare long with Long, which can throw an NPE when getStoreZoneId returns null. The reporter says this came in with #7873 and is present on 4.19 onward.
📊 Assessment
🔗 Similar issues
- listSnapshots fails with NPE in snapshot strategy canHandle when a snapshot's volume row no longer exists #14599 (related) — NPE in snapshot strategy canHandle() when the volume row is missing
- revertSnapshot fails with an NPE when the snapshot's volume has been deleted #14644 (related) — revertSnapshot NPE when the snapshot's volume is deleted; the same kind of unchecked lookup
💡 Notes and suggestions- Reproduction: a snapshot with its only copy in zone A, then getSnapshotWithRoleAndZone for zone B. Expect null.
- Check whether the NPE path is reachable when the primary pool lookup throws.
Add this agentic workflow to your repoTo install this agentic workflow, run