bito-code-review[bot] commented on code in PR #40329:
URL: https://github.com/apache/superset/pull/40329#discussion_r3318883753
##########
superset/commands/tag/create.py:
##########
@@ -60,9 +60,35 @@ def validate(self) -> None:
exceptions.append(
TagCreateFailedError(f"invalid object type
{self._object_type}")
)
+
+ # Validate user has access to the target object
+ if object_type:
+ self._validate_object_access(object_type, self._object_id,
exceptions)
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Security: Inconsistent access checks</b></div>
<div id="fix">
`CreateCustomTagWithRelationshipsCommand` (lines 93-146) performs access
validation differently - it checks `raise_for_ownership` instead of
`raise_for_access`. Consider applying the same `_validate_object_access`
pattern for consistency in security enforcement.
</div>
</div>
<small><i>Code Review Run #4c0b1c</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]