-
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: report known malware for all ecosystems #922
base: staging
Are you sure you want to change the base?
Conversation
5fd7cb4
to
688af68
Compare
615048d
to
426767b
Compare
Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
426767b
to
b76afe2
Compare
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}) |
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.
Why change dict[Heuristics, HeuristicResult]]
to dict
? In the new case it is empty, but that is still consistent with the old type.
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.
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( |
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.
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).
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.