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

feat: report known malware for all ecosystems #922

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

Conversation

behnazh-w
Copy link
Member

If a package is already known to be malicious, this PR reports it as part of the mcn_detect_malicious_metadata_1 check. Additionally, two new integration tests for known Python and npm malware have been added.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 19, 2024
@behnazh-w behnazh-w force-pushed the behnazh/check-known-mal branch 2 times, most recently from 615048d to 426767b Compare November 19, 2024 04:35
Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
DBJsonDict, nullable=False, info={"justification": JustificationType.TEXT}
)
#: The result of analysis, which can be an empty dictionary.
result: Mapped[dict] = mapped_column(DBJsonDict, nullable=False, info={"justification": JustificationType.TEXT})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change dict[Heuristics, HeuristicResult]] to dict? In the new case it is empty, but that is still consistent with the old type.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right. I don't need to change dict[Heuristics, HeuristicResult]].

@@ -125,6 +125,80 @@ def send_get_http_raw(
return response


def send_post_http_raw(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is quite a bit of duplication between send_post_http_raw, send_get_http_raw and send_get_http (each has an implementation of error handling and retry logic), it would be good to refactor that at some point (but it doesn't have to be done as part of this change).

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.

3 participants