We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://github.com/returntocorp/sgrep-rules/blob/663a95579bb825f578068794ffc63c41cb9e3417/python/socket/bind.py#L24
- pattern-either: - pattern: | $S = socket.socket(...) ... $S.bind(("0.0.0.0", ...)) - pattern: | $S = socket.socket(...) ... $S.bind(("", ...))
is triggering on:
easy_s = socket.socket(doesnt, matter) easy_s.bind()
But I expect it not to, given it has no arguments.
The text was updated successfully, but these errors were encountered:
Is it normal there is extra parenthesis inside $S.bind? (("", ...))
Sorry, something went wrong.
Yes, not a typo -- you call .bind with a tuple
.bind
I can't reproduce on your test example. If I do this pattern: $S = socket.socket(...) ... $S.bind()
$ /home/pad/github/sgrep/_build/default/bin/main_sgrep.exe -f tests/python/misc_tuple.sgrep tests/python/ /home/pad/github/sgrep/tests/python/misc_tuple.py:1 easy_s = socket.socket(doesnt, matter) easy_s.bind()
it finds it. But I put back your pattern: $S = socket.socket(...) ... $S.bind(("", ...))
$ /home/pad/github/sgrep/_build/default/bin/main_sgrep.exe -f tests/python/misc_tuple.sgrep tests/python/ then no match (as expected).
aryx
No branches or pull requests
https://github.com/returntocorp/sgrep-rules/blob/663a95579bb825f578068794ffc63c41cb9e3417/python/socket/bind.py#L24
is triggering on:
But I expect it not to, given it has no arguments.
The text was updated successfully, but these errors were encountered: