Skip to content
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

chore: implement method to validate suspicious packages for malicious… #851

Draft
wants to merge 1 commit into
base: staging
Choose a base branch
from

Conversation

Yao-Wen-Chang
Copy link
Contributor

This PR refers to issue #810.

This PR implements the validator to confirm malware on PyPI. We analyze the data flow by walking through the AST and finding out the actual value of the variable.

For example:

requests.get(malicious_endpoint)
malicious_endpoint = "https://malicious.com"

The new method should be able to detect the https://malicious.com. Furthermore, we will analyze the historical malware data to define the suspicious pattern as a .yaml.

The suspicious_setup heuristic will be removed since it overlaps with our new method.

Following are the tasks for implementing this method:

  • Analyze the historical malware and define the malicious pattern in .yaml
  • Remove suspicious_setup heuristic
  • Implement the method to analyze the data flow
  • Provide unit tests
  • Test the method on the latest packages on PyPI to ensure the detector is more accurate

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant