Skip to content
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

Python: add models for stdlib #15306

Draft
wants to merge 43 commits into
base: main
Choose a base branch
from
Draft

Conversation

yoff
Copy link
Contributor

@yoff yoff commented Jan 12, 2024

  • urllib.parse.urljoin
  • fnmatch.filter
  • optparse.parse_args

This brings the number of results for py/shell-command-constructed-from-input on a database for tanghaibao/jvci extracted without the standard lib up from 5978 to 17055. With the standard library, we get 17062 results.

@yoff yoff added the no-change-note-required This PR does not need a change note label Jan 12, 2024
python/ql/src/meta/StdLib/FindUses.ql Fixed Show fixed Hide fixed
python/ql/src/meta/StdLib/FindUses.ql Fixed Show fixed Hide fixed
python/ql/src/meta/StdLib/FindUses.ql Fixed Show fixed Hide fixed
yoff added 23 commits April 9, 2024 21:28
- `urllib.parse.urljoin`
- `fnmatch.filter`
- `optparse.parse_args`

This brings the number of results for `py/shell-command-constructed-from-input`
on a database for `tanghaibao/jvci` extracted without the standard lib
up from 5978 to 17055. With the standard library, we get 17062 results.
looks nicer and allows easy evaluation of summaryLocalStep contribution
this should be removed in final version
does not recognize flow summary models yet
- elide any `Member[__init__]`
- summaries need to be vetted, all generated
Also attempt more modelling, but it seems to not have the intended effect.
I should test the summary syntax for this.
- add hardcoded credentials query
- better function names
- better funtion paths
for easy debug, do not import all path-graphs
import just the one(s) of interest instead
and sort the lines
it does not get evaluated by MRVA
- better argument path: collate positional and keyword arguments
- better resturn path: method calls go to `ReturnValue` rather than `Argument[self:]`
it feels like it may get evaluated, just not reported, by MRVA
@yoff yoff force-pushed the python/add-stdlib-models branch from 35e5844 to ad4359e Compare April 9, 2024 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-change-note-required This PR does not need a change note Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant