Curating AI/ML Packages with JFrog Curation¶
JFrog Curation provides a first line of defense in your AI/ML software supply chain. Rather than scanning packages after they've been downloaded, Curation blocks packages at ingestion โ preventing malicious or vulnerable AI libraries from entering your Artifactory instance at all.
JFrog Curation is available on JFrog SaaS plans. Access it at Application โ Curation.
Why Curate AI/ML Packages?¶
The AI/ML ecosystem introduces unique risks:
| Risk | Example |
|---|---|
| Typosquatting | torchvision-ml instead of torchvision |
| Malicious new releases | Legitimate package hijacked; malware injected in new version |
| Known CVEs | PyPI package with unfixed critical vulnerability |
| License violations | GPL-licensed package in a proprietary product |
| Deprecated packages | Abandoned ML library with no security patches |
Curation stops all of these before they land in Artifactory.
How JFrog Curation Works¶
Developer/CI requests package from pypi-virtual
โ
โผ
JFrog Curation evaluates it
against active Curation policies
โ
โโโโโโโโโดโโโโโโโโโ
โ โ
Policy passed Policy violated
โ โ
โผ โผ
Package cached Package BLOCKED
in pypi-remote โ Request rejected
โ Served to dev โ Audit log entry
โ Audit log entry โ Email/notification
Step 1: Enable Curation on Repositories¶
- Go to Application โ Curation โ Repositories
- Select your AI/ML PyPI remote repository (e.g.,
pypi-remote) - Toggle Curation Enabled: โ On
- Repeat for any Conda, npm, or Generic remote repos
Step 2: Create a Curation Policy¶
- Go to Application โ Curation โ Policies
- Click + New Policy
- Set Policy Name:
ai-ml-security-policy - Configure conditions:
Condition 1: Block packages with critical CVEs¶
- Condition: Malicious package or CVE
- Min Severity:
Critical - Action: Block
Condition 2: Block packages with no recent activity¶
- Condition: Package operational risk
- Inactive for:
> 2 years - Action: Warn (or Block for stricter security)
Condition 3: Block license violations¶
- Condition: License
- Forbidden Licenses:
GPL-3.0,AGPL-3.0 -
Action: Block
-
Click Save
Step 3: Assign Policy to Repositories¶
- Go to Application โ Curation โ Policies โ ai-ml-security-policy
- Click Assign Repositories
- Select:
pypi-remoteconda-remote(if applicable)- Click Save
Step 4: Test โ Try to Install a Blocked Package¶
Attempt to install a package that violates the policy:
pip install some-vulnerable-ai-package==1.2.3
# Output:
# ERROR: Could not find a version that satisfies the requirement...
# JFrog Curation: Package blocked by policy 'ai-ml-security-policy'
# Reason: Critical CVE CVE-2024-XXXXX (CVSS 9.8)
Step 5: View Curation Audit Logs¶
- Go to Application โ Curation โ Audit
- Filter by:
- Repository:
pypi-remote - Status:
Blocked - Date range
You'll see every blocked attempt with: - Package name + version - Policy violated - Developer/user who requested it - Timestamp
This provides full visibility into what your teams attempted to install.
Step 6: Approve Packages (Allow-list)¶
For packages that are blocked by policy but needed by your team:
- Go to Application โ Curation โ Packages
- Search for the package
- If you have authority to override, click Approve
- Add a justification comment
- The package is added to your allow-list โ the next
pip installsucceeds
Curation vs Xray: Key Difference¶
| Feature | JFrog Curation | JFrog Xray |
|---|---|---|
| When it acts | At ingestion (before caching) | After artifact is in Artifactory |
| What it stops | Malicious packages from entering at all | Flags CVEs in already-present artifacts |
| Use case | Prevent new risky packages | Audit and report on existing packages |
| Best practice | Use both together | Use both together |
Common AI/ML Curation Scenarios¶
| Scenario | Curation Rule |
|---|---|
Block all langchain pre-1.0 versions |
Version range condition on langchain < 1.0.0 |
| Block packages from unknown PyPI publishers | Source trust condition |
| Warn on GPL libraries | License alert condition |
| Block any package with malware signature | Malicious package condition (auto) |
| Allow only specific PyTorch versions | Version allowlist policy |
Next Steps¶
๐ AI/ML Security with Xray ๐ ML Model Repositories
๐ง Quick Quiz¶
What is the key difference between JFrog Curation and JFrog Xray in the context of AI/ML package security?
๐ฌ DevopsPilot Weekly โ Learn DevOps, Cloud & Gen AI the simple way.
๐ Subscribe here