[BUG] app_auth.updateSelective WHERE clause omits namespace_id (cross-namespace update)

Open Beginner friendly
#6,690 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
java, sql

Research direction

Start with shenyu-admin/src/main/resources/mappers/app-auth-sqlmap.xml:265-291 and compare updateSelective with the full update at lines 251-263. Trace AppAuthServiceImpl.createOrUpdate to confirm the selective path and verify that an id from another namespace cannot be updated without a matching namespace_id.

Written by the indexing model from the issue text.

Description

admin priority: medium type: bug
  • severity: Medium
  • files: shenyu-admin/src/main/resources/mappers/app-auth-sqlmap.xml:265-291 (updateSelective WHERE id=#{id}) vs :251-263 (full update WHERE id=#{id} AND namespace_id=#{namespaceId})
  • description: The full update scopes by id AND namespace_id, but updateSelective (the path used by AppAuthServiceImpl.createOrUpdate) scopes only by id (verified). A caller that supplies an id belonging to namespace A can mutate an app_auth row from namespace B without a namespace match.
  • impact: Potential cross-namespace tampering of app_auth when only an id is supplied and the namespace is not re-verified.
  • suggested_fix: Add AND namespace_id = #{namespaceId, jdbcType=VARCHAR} to updateSelective's WHERE.
  • confidence: Medium
  • related_existing: none. The baseline AppAuth issues (#6538-6540) are about updateDetail full-update nulling and path appName; this is the updateSelective WHERE clause.

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

Dominant language
Java
Stars
8.8k
Forks
3.1k
Avg merge
4d 11h
Merged PRs (30d)
85

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/shenyu

All issues in apache/shenyu

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.