codeant-ai-for-open-source[bot] commented on code in PR #41912:
URL: https://github.com/apache/superset/pull/41912#discussion_r3614312048


##########
superset-frontend/src/features/home/SavedQueries.tsx:
##########
@@ -139,6 +139,11 @@ export const SavedQueries = ({
   const canEdit = hasPerm('can_edit');
   const canDelete = hasPerm('can_delete');
 
+  const history = useHistory();
+  const openQuery = useCallback(
+    (query: Query) => history.push(`/sqllab?savedQueryId=${query.id}`),

Review Comment:
   **Suggestion:** Use a UUID-based saved query identifier in the navigation 
URL instead of the numeric ID, and update the query model/route param 
accordingly. [custom_rule_security]
   
   **Severity Level:** Critical 🚨
   <details>
   <summary><b>Why it matters? ⭐ </b></summary>
   
   The code exposes `query.id` in a public URL parameter (`savedQueryId`) and 
the `Query` type defines `id` as a number, so this directly violates the rule 
to prefer UUIDs over internal integer IDs in public APIs.
   </details>
   <details>
   <summary><b>Rule source 📖 </b></summary>
   
   === .github/copilot-instructions.md === (line 51)
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=7d6ff95d9d9c4bd593fb52dc12b65f28&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=7d6ff95d9d9c4bd593fb52dc12b65f28&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset-frontend/src/features/home/SavedQueries.tsx
   **Line:** 144:144
   **Comment:**
        *Custom Rule Security: Use a UUID-based saved query identifier in the 
navigation URL instead of the numeric ID, and update the query model/route 
param accordingly.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41912&comment_hash=1193381c6bbd5d7bce9180f4e5e2c5c8c1b097b03931601c98a0b3c28c8a4c43&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41912&comment_hash=1193381c6bbd5d7bce9180f4e5e2c5c8c1b097b03931601c98a0b3c28c8a4c43&reaction=dislike'>👎</a>



-- 
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]

Reply via email to