-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: include inspector package urls as part of the malicious metadata facts for pypi packages #935
Conversation
…g and inspector links
One change I have made that I am unsure about is, in The reason the check for a 200 OK response exists is due to the way I have constructed the pypi inspector link. I observe that the format of the pypi inspector link was the same as |
src/macaron/malware_analyzer/pypi_heuristics/metadata/wheel_absence.py
Outdated
Show resolved
Hide resolved
I have added a suggestion in this comment to improve the return value. If the inspector HEAD request fails, the value corresponding to the inspector could be |
src/macaron/malware_analyzer/pypi_heuristics/metadata/wheel_absence.py
Outdated
Show resolved
Hide resolved
src/macaron/malware_analyzer/pypi_heuristics/metadata/wheel_absence.py
Outdated
Show resolved
Hide resolved
src/macaron/malware_analyzer/pypi_heuristics/metadata/wheel_absence.py
Outdated
Show resolved
Hide resolved
Took a look at the source code for inspector, and I have confirmed the way it organises its URLs is what is used in this new feature. At
|
src/macaron/malware_analyzer/pypi_heuristics/metadata/wheel_absence.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks.
To allow for retention of packages when they are taken off PyPI, this new feature includes the inspector.pypi.io URL for the distribution files as part of the
MaliciousMetadataFacts
detail_information
field. This has been done by modifying thewheel_absence.py
heuristic to instead of returning filenames, return the python hosted URL and corresponding pypi inspector URL. The unit test for this,test_wheel_absence.py
has been updated to reflect these changes accordingly.