Remove unclaimed 'warnings' package from requirements.txt (security fix)#1000
Merged
Conversation
… stdlib warnings module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR removes the line warnings>=0.1.0 from requirements.txt in the end-to-end-use-cases/NotebookLlama directory.
Context
The warning package does not exist on PyPI, making it possible for a malicious actor to claim the package and upload harmful code.
This issue was reported via Meta's Bug Bounty program (internal report link).
The codebase only uses Python's built-in warnings module, which does not require installation via pip.
Mitigation
Removed the unclaimed warnings package from requirements.txt.
Verified that all usages of import warnings in the codebase refer to the standard library module.
No changes to code files were necessary.
Impact
This change mitigates a potential supply chain security risk (remote code execution) by ensuring that pip will not attempt to install a non-existent or malicious package.
End users will continue to have access to the standard warnings module as part of Python.