Semgrep: Certain patterns result in two matches

Created on 25 Feb 2020  路  5Comments  路  Source: returntocorp/semgrep

Describe the bug
Certain patterns (see repro) return two results on the same expression.

To Reproduce
This is on Python code:

Rule:

pattern: target(..., kw=$X, ...)

Code:

target(other_kw="foo", kw="bar")

Result: See message printed twice for same line of code.

Expected behavior
I expect only one match.

Desktop (please complete the following information):
Docker returntocorp/sgrep image 2772f96a29b9

bug python low

Most helpful comment

ha we searched for twice not three in the open issues

All 5 comments

@ievans I'm planning to fix in the python code but lmk if this is something you think should be passed off to @aryx

@DrewDennison as I read this issue, I think it is a question of sgrep; I think @aryx should weigh in

See also #128

ha we searched for twice not three in the open issues

This is now deduped in the python code so closing for now

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zythosec picture zythosec  路  5Comments

j-martin picture j-martin  路  6Comments

brendongo picture brendongo  路  5Comments

msorens picture msorens  路  5Comments

ievans picture ievans  路  5Comments