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

test: block the malware detection unit test from reaching network #955

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

behnazh-w
Copy link
Member

The detect_malicious_metadata check is expected to FAIL for pkg:pypi/zlibxjson by running the heuristics, but a false negative has been introduced after the addition of the wheel presence heuristic. The unit test was passing because if the unit test was able to access the OSV knowledge base, it would identify the package as a known malware without running the heuristics. However, to ensure unit tests remain offline, network access is intentionally blocked and because of that the check passes. There is a TODO to fix this regression after adding better code-based heuristics.

This PR modifies the API URL configurations to make them compatible with offline unit tests, ensuring they work without requiring network access.

Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
@behnazh-w behnazh-w requested review from benmss and art1f1c3R January 5, 2025 06:56
@behnazh-w behnazh-w requested a review from tromai as a code owner January 5, 2025 06:56
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jan 5, 2025
@behnazh-w behnazh-w merged commit ba5f2d9 into staging Jan 6, 2025
11 checks passed
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.

4 participants