You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by "Aias00 (via GitHub)" <gi...@apache.org> on 2026/08/03 00:49:37 UTC

[I] [BUG] ResourceController.updateResource bypasses all bean validation (@Valid missing on @RequestBody) [shenyu]

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

   - severity: High
   - files: `shenyu-admin/src/main/java/org/apache/shenyu/admin/controller/ResourceController.java:152`
   - description: `createResource` (line 136) uses `@Valid @RequestBody final CreateResourceDTO`, but `updateResource` (line 152) uses only `@RequestBody final ResourceDTO resourceDTO` with no `@Valid`. `ResourceDTO` declares 11 constraints (`@NotBlank` on parentId/title/name/url/component/icon/perms; `@NotNull` on resourceType/sort/isLeaf/isRoute/status). None are enforced on the update path.
   - impact: An authenticated user with `system:resource:editMenu`/`editButton` can update a resource with empty/null required fields, corrupting the menu/permission tree and potentially breaking RBAC enforcement (perms drives authorization checks).
   - suggested_fix: Add `@Valid` to the `@RequestBody` parameter on line 152, mirroring `createResource`.
   - confidence: High
   - related_existing: none — distinct from GOV-T1 (zero-test controllers) and SEC-13 (AppAuthVO plaintext).
   
   ---
   _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: notifications-unsubscribe@shenyu.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] ResourceController.updateResource bypasses all bean validation (@Valid missing on @RequestBody) [shenyu]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6617:
URL: https://github.com/apache/shenyu/issues/6617#issuecomment-5161205592

   👋 Hello @Aias00
   
   A new issue has been opened by @Aias00:
   - **Title**: [BUG] ResourceController.updateResource bypasses all bean validation (@Valid missing on @RequestBody)
   - **Link**: https://github.com/apache/shenyu/issues/6617
   
   Please review when you have time. Thank you! 🙏


-- 
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: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] ResourceController.updateResource bypasses all bean validation (@Valid missing on @RequestBody) [shenyu]

Posted by "Aias00 (via GitHub)" <gi...@apache.org>.
Aias00 closed issue #6617: [BUG] ResourceController.updateResource bypasses all bean validation (@Valid missing on @RequestBody)
URL: https://github.com/apache/shenyu/issues/6617


-- 
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: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org