-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to get SQLAlchemy sinks to work #826
Comments
I did find this commit that maybe breaks SQLAlchemy 1.4? c93e0a1 |
Hi, thanks for reaching out. |
This is a simple mistake.
|
Ahh thank you! I apologize for the waste of time. |
Pysa Bug
Pre-submission checklist
[x] I've checked the list of common issues and mine does not appear
Bug description
I've been unable to get pysa to work for a minimal sqlalchemy project. I have set it up using the sqlalchemy types from the
pyre-check
repo. I have set up two flows that should be detected - one to SQLAlchemy'sexecute
, andmy_sink
.my_sink
works as expected, SQLAlchemy does not.Reproduction steps
Try my repo: https://github.com/cyounkins/pysa-testing/tree/63395fc6b3ba826b1ebb9dec1c55abcadf4c7622
Expected behavior
Both flows should be detected.
Logs
Please run your reproduction steps with
--noninteractive
(eg.pyre --noninteractive analyze
) and paste the output here:Additional context
Add any other context about the problem here. (like dependencies in your venv, third party stub files being used, overall goals, etc.)
reveal_type
only seems to work some of time, and I haven't been able to figure out why. #825 In the beginning when it worked,reveal_type(engine.execute)
printed outƛ vuln:21:4-21:15: Revealed type for engine.execute: unknown
, which is obviously a problem.I ran
pyre infer
andpyre infer -i --annotate-from-existing-stubs
to try to fix the types. It added some, and explicitly assigned a type toengine
asengine: Engine = create_engine('sqlite:///test.db')
. Nowreveal_type
prints outThat... seems like it should work.
The engine.execute call should match one of these sink rules:
The second is mine because I was wondering if the one supplied in the repo was somehow wrong. Neither one works.
I have
types-SQLAlchemy==1.4.52
to get types for the older SQLAlchemy. I did try a bit with 2.0 and couldn't get it to work.Any pointers would be appreciated. What version of SQLAlchemy should I be trying? Are the flows here expected to work or no?
The text was updated successfully, but these errors were encountered: