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

[Bug][python] Incorrect processing of keyword parameters interrupts the data flow. #4842

Open
scanleale opened this issue Aug 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@scanleale
Copy link

Describe the bug
When I test a python function with a keyword argument, there is a break in the data flow

To Reproduce
py code like:

from typing import Optional
def func1(path: str):
    dataset_module = '123'
    dataset_name = path
    #get_dataset_builder_class(dataset_module, dataset_name)
    get_dataset_builder_class(dataset_module, dataset_name=dataset_name)
def get_dataset_builder_class(
    dataset_module: Optional[str], dataset_name: Optional[str] = None
):
    print(dataset_module)
    print(dataset_name)
    
func1("yooho")
def source = cpg.literal(".*yooho.*")
def sink = cpg.call("print")
sink.reachableByFlows(source).p

image

Expected behavior
While I use comment code which Non-Keyword Arguments get_dataset_builder_class(dataset_module, dataset_name), it looks like right.
image

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • WINDOWS11
  • Version: 4.0.34
  • openjdk 19

Additional context
Add any other context about the problem here.

@scanleale scanleale added the bug Something isn't working label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant