Skip to content

LGTM.com - false positive because of setter in python #10587

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

Open
chrisorner opened this issue Sep 27, 2022 · 1 comment
Open

LGTM.com - false positive because of setter in python #10587

chrisorner opened this issue Sep 27, 2022 · 1 comment
Labels
acknowledged GitHub staff acknowledges this issue false-positive not security This issue does not relate to a security query

Comments

@chrisorner
Copy link

Description of the false positive

If a string is passed to the aoi_model attribute of the ModelChain class, aoi_model.setter is called and assigns a function to self.aoi_model based on the string that was passed in. self.aoi_model is therefore always callable.

URL to the alert on the project page on LGTM.com

https://lgtm.com/projects/g/pvlib/pvlib-python/snapshot/9638d5facde44227b3bd9503c5b1dabb9b3e1fe7/files/pvlib/modelchain.py?sort=name&dir=ASC&mode=heatmap#x7614d2aff6b90c1b:1

@alexet alexet added acknowledged GitHub staff acknowledges this issue not security This issue does not relate to a security query labels Sep 27, 2022
@alexet
Copy link
Contributor

alexet commented Sep 27, 2022

Indeed, this looks like a false positive. Thank you for reporting it!

Our current focus is on improving our security analysis. Because your report does not relate to a security query, we will put this on our backlog and prioritize it if we get enough reports of the same underlying issue in other projects. If you think that your report is related to our security analysis, please clarify that in a comment. Either way, we'll let you know here as soon as it's fixed!

As you might know, all of our queries are open source. If you do have an idea for a code change, we encourage you to open a pull request. GitHub Code Scanning and lgtm.com have facilities for suppressing individual alerts or disabling a query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledged GitHub staff acknowledges this issue false-positive not security This issue does not relate to a security query
Projects
None yet
Development

No branches or pull requests

2 participants