Skip to content

[BUG] AlertReceiverServiceImpl.updateReceiver uses full updateByPrimaryKey, nulling omitted columns #6711

Closed

Description

@Aias00
  • severity: Medium
  • files: shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/AlertReceiverServiceImpl.java:78-82
  • description: updateReceiver maps the DTO via AlertTransfer.INSTANCE.mapToAlertReceiverDO and calls alertReceiverMapper.updateByPrimaryKey(receiverDO) (full column update). Any DTO field not populated becomes NULL (e.g. namespaceId, levels, labels, matchAll, enable, config).
  • impact: Partial PUT payloads silently wipe receiver configuration, which can disable alerting or change matching scope.
  • suggested_fix: Switch to updateByPrimaryKeySelective(receiverDO), or require full DTO on update.
  • confidence: Medium
  • related_existing: none.

Identified during the 2026-08-02 deep re-scan; full list in docs/scan2-2026-08-02/06-medium-tiers.md.

Activity

  1. github-actions commented on Aug 3, 2026

    @github-actions
    Contributor

    👋 Hello @Aias00

    A new issue has been opened by @Aias00:

    Please review when you have time. Thank you! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions