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

   - severity: High
   - files: 
`shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/ResourceServiceImpl.java:211-217`
   - description: `onPluginCreated` (an 
`@EventListener(PluginCreatedEvent.class)`) calls `this.createOne(resourceDO)` 
(insert + `publisher.onCreated` which triggers 
`PermissionServiceImpl.onResourcesCreated` inserting a permission row) and then 
`insertResourceBatch(...)` (batch insert + batch permission insert). The method 
has no `@Transactional` annotation, unlike `onPluginDeleted` (line 224, which 
IS `@Transactional`). A failure mid-way leaves orphaned resource/permission 
rows.
   - impact: Partial-failure leaves resources with missing data-permission 
resources, or permissions for resources that were not fully created.
   - suggested_fix: Add `@Transactional(rollbackFor = Exception.class)` to 
`onPluginCreated`, mirroring `onPluginDeleted`.
   - confidence: High
   - related_existing: none.
   
   ---
   _Identified during the 2026-08-02 deep re-scan; full list in 
[`docs/scan2-2026-08-02/00-consolidated-critical-high.md`](docs/scan2-2026-08-02/00-consolidated-critical-high.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