Aias00 opened a new issue, #6699:
URL: https://github.com/apache/shenyu/issues/6699

   - severity: Medium
   - files: 
`shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/DiscoveryUpstreamServiceImpl.java:149-170`
   - description: For each discovery handler, 
`discoveryRelMapper.selectByDiscoveryHandlerId(d.getId())` is dereferenced 
immediately at line 154 (`discoveryRelDO.getPluginName()`) and 155 
(`discoveryRelDO.getSelectorId()`). If a handler has no rel row, this is an 
NPE. `selectorMapper.selectById(selectorId)` (158) and 
`proxySelectorMapper.selectById(proxySelectorId)` (163) are also dereferenced 
without null checks.
   - impact: A single orphan discovery-handler/rel or stale selector-id throws 
NPE and breaks the whole `listAll` sync (used by `SyncDataServiceImpl.syncAll`).
   - suggested_fix: Null-check `discoveryRelDO`, `selectorDO`, and 
`proxySelectorDO` and skip/log.
   - confidence: Medium
   - related_existing: #6586 covers the N+1 query pattern in this method; these 
NPE derefs are a distinct defect in the same method.
   
   ---
   _Identified during the 2026-08-02 deep re-scan; full list in 
[`docs/scan2-2026-08-02/06-medium-tiers.md`](docs/scan2-2026-08-02/06-medium-tiers.md)._


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to