bito-code-review[bot] commented on code in PR #41120:
URL: https://github.com/apache/superset/pull/41120#discussion_r3422830163


##########
superset/config.py:
##########
@@ -1872,6 +1872,20 @@ def engine_context_manager(  # pylint: 
disable=unused-argument
         "pg_read_file",
         "pg_ls_dir",
         "pg_read_binary_file",
+        # PostgreSQL large-object functions: writers can plant arbitrary
+        # bytes on the server filesystem (lo_export, lo_from_bytea, lowrite,
+        # lo_put, lo_create, lo_import), readers can pull bytes back out
+        # (lo_get, loread), and lo_unlink deletes large objects outright.
+        # Defense-in-depth on top of is_mutating()'s function-name check.
+        "lo_from_bytea",
+        "lo_export",
+        "lo_import",
+        "lo_put",
+        "lo_create",
+        "lowrite",
+        "lo_get",
+        "loread",
+        "lo_unlink",

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>CWE-276: lo_creat Missing from Blocklist</b></div>
   <div id="fix">
   
   Add 'lo_creat' to the DISALLOWED_SQL_FUNCTIONS['postgresql'] set alongside 
'lo_create' to block the alias and maintain coverage. (See also: 
[CWE-276](https://cwe.mitre.org/data/definitions/276.html))
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #58aed7</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]

Reply via email to