CodeVetter · Repo Unpack · Risk map
sqlalchemy/sqlalchemy
These are source observations about trust boundaries and fragile behavior, not confirmed vulnerabilities. Sensitive inputs include SQL strings, mapping expressions, pickle data, database URLs, plugin selections, and query parameters that may enter logs. Driver calls can reach network databases or files outside the checkout. Transaction hooks and async context switching add correctness risks that require targeted regression coverage.
- _class_resolver.__call__ evaluates expression strings with eval unless tables_only is selected; supplying untrusted mapping expressions would cross a Python execution boundary.
- The legacy serializer subclasses pickle.Unpickler, invokes nested pickle.loads, and exposes loads(data); its own documentation warns that pickle security considerations apply.
- exec_driver_sql bypasses expression compilation and forwards caller-controlled SQL to cursor.execute; parameter safety depends on callers keeping values in driver parameters rather than interpolating SQL.
- Echo execution logs include parameter representations unless hide_parameters is enabled; URL rendering masks the password field by default but still renders query values.
- SQLite connection arguments accept absolute paths and normalize ordinary file names with os.path.abspath; driver connections therefore can access caller-selected files outside the repository.
- URL plugin names instantiate registered Python plugins before engine construction; PluginLoader loads package entrypoints or imports registered modules, making plugin selection an executable configuration boundary.
- Flush hooks can add further work, and commit caps repeated flushes at 100; mutations inside inner-flush handlers can have attribute history reset without database updates, while failures trigger captured rollback.
- Async IO requires the greenlet bridge: await_ raises MissingGreenlet outside it, and AsyncEngine rejects synchronous drivers. Commit's default expiration can require reloads that the async API does not support implicitly.