Description: This PR adds HuggingFace as a new source. Users will have the ability to scan a HF model, dataset or space. A HF token is required for all scans except basic git scans of a public mode...
if err := eng.ScanJenkins(ctx, cfg); err != nil { return scanMetrics, fmt.Errorf("failed to scan Jenkins: %v", err) } case huggingfaceScan.FullCommand(): if *huggingfaceEndpoint != "" { *huggingfaceEndpoint = strings.TrimRight(*huggingfaceEndpoint, "/") } cfg := engine.Huggingface...
case jenkinsScan.FullCommand(): cfg := engine.JenkinsConfig{ Endpoint: *jenkinsURL, InsecureSkipVerifyTLS: *jenkinsInsecureSkipVerifyTLS, Username: *jenkinsUsername, Password: *jenkinsPassword, } if err := e.ScanJenkins(ctx, cfg); err != nil { logFatal(err, "Failed to scan Jenkins.") }...
iferr:=eng.ScanHuggingface(ctx,cfg);err!=nil{ returnscanMetrics,fmt.Errorf("failed to scan HuggingFace: %v",err) } default: returnscanMetrics,fmt.Errorf("invalid command: %s",cmd) } Expand Down 80 changes: 80 additions & 0 deletions80pkg/engine/huggingface.go ...