Skip to content

XRAY-145929 - Onboard hugging face for jf curation-audit#786

Open
gauriy-tech wants to merge 4 commits into
jfrog:devfrom
gauriy-tech:feature/XRAY-145929-onboard-huggingface
Open

XRAY-145929 - Onboard hugging face for jf curation-audit#786
gauriy-tech wants to merge 4 commits into
jfrog:devfrom
gauriy-tech:feature/XRAY-145929-onboard-huggingface

Conversation

@gauriy-tech

@gauriy-tech gauriy-tech commented Jun 24, 2026

Copy link
Copy Markdown
Contributor
  • The pull request is targeting the dev branch.
  • The code has been validated to compile successfully by running go vet ./....
  • The code has been formatted properly using go fmt ./....
  • All static analysis checks passed.
  • All tests have passed. If this feature is not already covered by the tests, new tests have been added.
  • Updated the Contributing page / ReadMe page / CI Workflow files if needed.
  • All changes are detailed at the description. if not already covered at JFrog Documentation, new documentation have been added.

Adds huggingfaceml as a first-class package type in jf curation-audit, enabling curation policy enforcement for Hugging Face models used in Python and notebook projects.

Auto-discovery: When HF_ENDPOINT is set and .py/.ipynb files are present, jf ca statically scans source for HF call sites and probes each discovered model against Artifactory curation. Dynamic references and local paths are surfaced as warnings after the table.

Spot-check mode: --hugging-face-model=<org/model>[:] audits only the explicitly named models, skipping auto-discovery and all other package managers. Supports comma-separated values.

Datasets are detected but not audited — Catalog does not currently score datasets.

No impact on jf audit, jf scan, or any existing package manager workflow.

Screenshot 2026-07-08 at 2 11 37 PM

@gauriy-tech
gauriy-tech force-pushed the feature/XRAY-145929-onboard-huggingface branch from e77a0f1 to 67e5806 Compare June 30, 2026 08:44
@gauriy-tech
gauriy-tech force-pushed the feature/XRAY-145929-onboard-huggingface branch from 67e5806 to 8273f2a Compare June 30, 2026 10:54
@gauriy-tech
gauriy-tech force-pushed the feature/XRAY-145929-onboard-huggingface branch from 8273f2a to 8b5e0c3 Compare July 1, 2026 04:37
@gauriy-tech
gauriy-tech force-pushed the feature/XRAY-145929-onboard-huggingface branch from 8b5e0c3 to 84de8d8 Compare July 1, 2026 05:14
@gauriy-tech
gauriy-tech force-pushed the feature/XRAY-145929-onboard-huggingface branch from 84de8d8 to 726e418 Compare July 1, 2026 05:51
@gauriy-tech
gauriy-tech force-pushed the feature/XRAY-145929-onboard-huggingface branch from 726e418 to 19a67bf Compare July 2, 2026 04:27
@gauriy-tech
gauriy-tech force-pushed the feature/XRAY-145929-onboard-huggingface branch from 19a67bf to f4b0c1b Compare July 2, 2026 08:20
@gauriy-tech
gauriy-tech force-pushed the feature/XRAY-145929-onboard-huggingface branch from 2426cd5 to eb374d5 Compare July 7, 2026 04:57
@gauriy-tech
gauriy-tech force-pushed the feature/XRAY-145929-onboard-huggingface branch from eb374d5 to 0845e3b Compare July 7, 2026 08:09
@gauriy-tech
gauriy-tech force-pushed the feature/XRAY-145929-onboard-huggingface branch from 0845e3b to f6e8a3d Compare July 8, 2026 09:22
@gauriy-tech
gauriy-tech force-pushed the feature/XRAY-145929-onboard-huggingface branch from f6e8a3d to d54f456 Compare July 8, 2026 09:52
Comment thread commands/curation/curationaudit.go Outdated
Comment thread sca/bom/buildinfo/technologies/huggingface/discovery/python.go Outdated
Comment thread sca/bom/buildinfo/technologies/huggingface/discovery/python.go Outdated
Comment thread sca/bom/buildinfo/technologies/huggingface/discovery/scanner.go Outdated
@gauriy-tech
gauriy-tech force-pushed the feature/XRAY-145929-onboard-huggingface branch from a112e7b to 8e6dbe1 Compare July 17, 2026 07:05
@gauriy-tech
gauriy-tech force-pushed the feature/XRAY-145929-onboard-huggingface branch from 8e6dbe1 to 16e7868 Compare July 17, 2026 08:08
@gauriy-tech gauriy-tech added the safe to test Approve running integration tests on a pull request label Jul 17, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Jul 17, 2026
@gauriy-tech gauriy-tech added the safe to test Approve running integration tests on a pull request label Jul 17, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Jul 17, 2026
@gauriy-tech
gauriy-tech force-pushed the feature/XRAY-145929-onboard-huggingface branch from 5c728c3 to 4e927ac Compare July 20, 2026 06:40
@gineshkumar

Copy link
Copy Markdown

[Re: commands/curation/curationaudit.go:934] Reusing getHuggingFaceNameAndVersion to extract the project label from the tree root (a directory name, not a repo_id:revision) makes every HF audit's project name show a spurious :main suffix in both the table title and the JSON summary Target field — SplitRepoIDAndRevision finds no : in a bare dir name and the revision unconditionally defaults to main. (Source: getUrlNameAndVersionByTech dispatch, line 2010)

	_, projectName, projectScope, projectVersion := getUrlNameAndVersionByTech(tech, rootNode, nil, "", "")
	if tech == techutils.HuggingFaceML {
		// rootNode.Id is a directory/project name, not a "repo_id:revision" model
		// reference — getHuggingFaceNameAndVersion's revision-defaulting logic only
		// applies to real model nodes.
		projectName, projectVersion = rootNode.Id, ""
	}

Review generated by xray-pr-review

@gauriy-tech
gauriy-tech force-pushed the feature/XRAY-145929-onboard-huggingface branch from 4e927ac to b07f3da Compare July 20, 2026 15:37
@gauriy-tech
gauriy-tech force-pushed the feature/XRAY-145929-onboard-huggingface branch from b07f3da to b5c050c Compare July 20, 2026 16:04
@gauriy-tech
gauriy-tech force-pushed the feature/XRAY-145929-onboard-huggingface branch from b5c050c to a2ce5ce Compare July 20, 2026 16:27
@gauriy-tech
gauriy-tech force-pushed the feature/XRAY-145929-onboard-huggingface branch from a2ce5ce to aa863d2 Compare July 20, 2026 16:53
@github-actions

Copy link
Copy Markdown
Contributor

👍 Frogbot scanned this pull request and did not find any new security issues.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Approve running integration tests on a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants