Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add section on malware scanning #583

Merged
merged 2 commits into from
Jan 11, 2022
Merged

Add section on malware scanning #583

merged 2 commits into from
Jan 11, 2022

Conversation

McPatate
Copy link
Member

No description provided.

@McPatate McPatate assigned n1t0 and unassigned n1t0 Jan 10, 2022
@McPatate McPatate requested a review from n1t0 January 10, 2022 16:39
![/docs/assets/hub/eicar-hub-tree-view.png](/docs/assets/hub/eicar-hub-tree-view.png)

![/docs/assets/hub/eicar-hub-file-view.png](/docs/assets/hub/eicar-hub-file-view.png)

Copy link
Member

Choose a reason for hiding this comment

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

maybe even link to that dummy sample repo here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes why not :)

@julien-c julien-c requested a review from gary149 January 10, 2022 16:57
@julien-c julien-c requested a review from osanseviero January 11, 2022 10:25
Copy link
Member

@julien-c julien-c left a comment

Choose a reason for hiding this comment

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

LGTM!

You'll need to update the submodule in moon-landing when this is merged, for the doc to appear on the website


![/docs/assets/hub/eicar-hub-file-view.png](/docs/assets/hub/eicar-hub-file-view.png)

_Note_: if your file has neither an ok or infected badge, it could mean that it is either currently being scanned / waiting to be scanned or that there was an error during the scan. It can take up to a few minutes to be scanned.
Copy link
Contributor

Choose a reason for hiding this comment

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

Unrelated to this PR, but should we also show a big warning in https://huggingface.co/mcpotato/42-eicar-street when a repo has infected files?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's kind of there already, just on the files tab

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it's the same. As a user of a model, I would likely not open the files tab, just read the model card and even click the "how to clone" button in the model card to download the model. If a model is scanned to be unsafe, we should show it more prominently imo. (happy to follow up discussing this in slack :D)

Copy link
Member

Choose a reason for hiding this comment

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

Yes we can definitely add this to the main repo page as well (cc @gary149)

maybe you can add a PR to do that at some point @McPatate (no huge rush IMO, given that no repo is currently infected)

The only drawback i see is an extra http call for each repo page load => maybe we want to cache a list of "infected repos" in the DB then (and move to a slightly more stateful design)

Thoughts?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've just made it so that calls to my API take on avg 5-10 ms. Is that too much of an overhead ?

Copy link
Member

Choose a reason for hiding this comment

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

no 5-10ms is fine

@julien-c
Copy link
Member

Ok for me to merge this! (and deploy on hf.co)

@McPatate McPatate merged commit d547838 into main Jan 11, 2022
@McPatate McPatate deleted the feat/docs-sec-malware-scan branch January 11, 2022 15:51
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants