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
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/assets/hub/eicar-hub-file-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/hub/eicar-hub-tree-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions docs/hub/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,18 @@ git commit -S -m "My first signed commit"
```

Once pushed on the Hub, you should see the commit with a "Verified" badge.

## Malware Scanning

We run every file of your repositories through a [malware scanner](https://www.clamav.net/).

Scanning is triggered at each commit or when you visit a repository page.

Here is an example view of an infected file :

![/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 :)

_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