-
Notifications
You must be signed in to change notification settings - Fork 47
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
New pypi exploits #311
Comments
Weird, the
|
I can reproduce the false negative:
|
And I can confirm that my reproduction method (putting the Python file in a ZIP and scanning the ZIP) is supposed to work:
|
However, it seems that semgrep alone does find the code execution (at line 221 in my example):
|
Wait, that's weird, guarddog does report findings depending on the filename I use in the ZIP archive:
It seems to ignore the file if it is named |
Well it seems like GuardDog does have a list of files it will not scan with SemGrep: guarddog/guarddog/analyzer/analyzer.py Line 50 in e49bf32
However, |
Well running guarddog with an empty |
So the problem seems to be that semgrep every single file unless if its named According to https://semgrep.dev/docs/writing-rules/testing-rules/:
But this is just supposed to be for testing, right? |
Ah, found it! It's not a bug it's a feature ™️
guarddog/guarddog/analyzer/sourcecode/code-execution.yml Lines 113 to 116 in e49bf32
|
So, the conclusion is:
|
closing in favor of #312 as discussed with @cedricvanrompay-datadog |
Sources:
https://thehackernews.com/2024/02/lazarus-exploits-typos-to-sneak-pypi.html
https://blogs.jpcert.or.jp/en/2024/02/lazarus_pypi.html
Ran guarddog on this locally zipped code and got 0 malicious indicators
The text was updated successfully, but these errors were encountered: