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

lgtm: replace the query used for looking for fgets with a more general query #11965

Merged
merged 1 commit into from Mar 12, 2019

Conversation

evverx
Copy link
Member

@evverx evverx commented Mar 11, 2019

to make it easier to comlain about strtok :-)

Inspired by #11963, which, in turn, was prompted by #11555.

…l query

to make it easier to comlain about `strtok` :-)

Inspired by systemd#11963, which, in turn,
was prompted by systemd#11555.
@evverx evverx added the ci label Mar 11, 2019
@evverx
Copy link
Member Author

evverx commented Mar 11, 2019

Judging by https://lgtm.com/query/4363101629453643551/, it seems to be working.

@poettering poettering merged commit 7ba5ded into systemd:master Mar 12, 2019
@poettering
Copy link
Member

Excellent! Thanks!

@evverx evverx deleted the lgtm-strtok branch March 12, 2019 09:49
* security
*
* Borrowed from
* https://github.com/Semmle/ql/blob/master/cpp/ql/src/Security/CWE/CWE-676/PotentiallyDangerousFunction.ql
Copy link
Member Author

@evverx evverx Mar 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The query pack has just been updated and everything seems to be more or less fine except that "borrowed", "from" and the url are considered tags: https://lgtm.com/rules/1507954176130/. @samlanning is this expected and I should move that comment somewhere else?

It's unrelated, but I've just run into https://lgtm.com/blog/introducing_dataflow_path_exploration. I'm wondering if it is the same as "taint source modeling" you were talking about in #11754 (comment).

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@evverx regarding the tags, yes this is expected. For comments like that, i would suggest just using 'normal' block comments outside of the QLDoc, underneath it. i.e. just using /* */

Regarding the taint source modelling, the resulting query would probably be a taint-tracking or data-flow query, so yes. The query could be expressed as a path-problem, and would produce paths that can be viewable in LGTM's UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants