You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Semgrep rule isn't matching all function invocation calls inside function body. Example: Semgrep playground link. Is there any alternative way to match all possible auth.Verify method invocation within golang function
Expected behavior
Would it be possible to match every auth.Verify instance within the method body?
What is the priority of the bug to you?
P0: blocking your adoption of Semgrep or workflow
P1: important to fix or quite annoying
P2: regular bug that should get fixed
Environment
Semgrep playground / Ubuntu 22.04
Use case
What will fixing this bug enable for you?
Reduce some false positives while detecting auth functions in method body.
The text was updated successfully, but these errors were encountered:
hi @shivasurya , this is actually expected behavior as $X.Verify() is a statement when written in the body of a function like that, and you are looking for it in an expression context. If you only wanted to match what you have I'd write two separate patterns, e.g.: https://semgrep.dev/playground/s/5rvrl
Thanks @ievans for the quick feedback. I'm not sure if this will cover all cases in the code within function block. However, I'll try to workaround with this.
Describe the bug
Semgrep rule isn't matching all function invocation calls inside function body. Example: Semgrep playground link. Is there any alternative way to match all possible
auth.Verify
method invocation within golang functionExpected behavior
Would it be possible to match every auth.Verify instance within the method body?
What is the priority of the bug to you?
Environment
Semgrep playground / Ubuntu 22.04
Use case
What will fixing this bug enable for you?
Reduce some false positives while detecting auth functions in method body.
The text was updated successfully, but these errors were encountered: