Skip to content

Commit 4545d17

Browse files
Security new 3rd party (#1625)
* feat: security jfrog * feat: add description of JFrog scanner functionality --------- Co-authored-by: Luc Georges <[email protected]>
1 parent f4fb4bc commit 4545d17

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

docs/hub/_toctree.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,8 @@
390390
title: Secrets Scanning
391391
- local: security-protectai
392392
title: "Protect AI"
393+
- local: security-jfrog
394+
title: "JFrog"
393395
- local: moderation
394396
title: Moderation
395397
- local: paper-pages

docs/hub/security-jfrog.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Third-party scanner: JFrog
2+
3+
4+
[JFrog](https://jfrog.com/)'s security scanner detects malicious behavior in machine learning models.
5+
6+
![JFrog report for the danger.dat file contained in mcpotato/42-eicar-street](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/jfrog-report.png)
7+
*Example of a report for [danger.dat](https://huggingface.co/mcpotato/42-eicar-street/blob/main/danger.dat)*
8+
9+
We partnered with JFrog to provide scanning in order to make the Hub safer. Model files are scanned by the JFrog scanner and reports you the scanning result.
10+
11+
JFrog's scanner is built with the goal to reduce false positives. Indeed, what we currently observe is that code contained within model weights is not always malicious. When code is detected in a file, JFrog's scanner will parse it and analyze to check for potential malicious usage.
12+
13+
<div class="flex justify-center">
14+
<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/jfrog-scanner.png"/>
15+
<img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/jfrog-scanner.png" />
16+
</div>
17+
18+
Here is an example repository you can check out to see the feature in action: [mcpotato/42-eicar-street](https://huggingface.co/mcpotato/42-eicar-street).
19+
20+
## Model security refresher
21+
22+
To share models, we serialize the data structures we use to interact with the models, in order to facilitate storage and transport. Some serialization formats are vulnerable to nasty exploits, such as arbitrary code execution (looking at you pickle), making sharing models potentially dangerous.
23+
24+
As Hugging Face has become a popular platform for model sharing, we’d like to protect the community from this, hence why we have developed tools like [picklescan](https://github.com/mmaitre314/picklescan) and why we integrate third party scanners.
25+
26+
Pickle is not the only exploitable format out there, [see for reference](https://github.com/Azure/counterfit/wiki/Abusing-ML-model-file-formats-to-create-malware-on-AI-systems:-A-proof-of-concept) how one can exploit Keras Lambda layers to achieve arbitrary code execution.
27+

docs/hub/security.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ For any other security questions, please feel free to send us an email at securi
2121
- [Pickle Scanning](./security-pickle)
2222
- [Secrets Scanning](./security-secrets)
2323
- [Third-party scanner: Protect AI](./security-protectai)
24+
- [Third-party scanner: JFrog](./security-jfrog)
2425
- [Resource Groups](./security-resource-groups)

0 commit comments

Comments
 (0)