scorecard icon indicating copy to clipboard operation
scorecard copied to clipboard

Support private git servers (like Github Enterprise instances)

Open nv35 opened this issue 4 years ago • 2 comments

Is your feature request related to a problem? Please describe. I would like to run scorecard for a repository that is hosted on my Github Enterprise instance. I currently can't.

$ scorecard --repo github.corp.net/nv35/myrepo
2021/07/05 09:24:35 unsupported host: github.corp.net

Describe the solution you'd like Allow to use the others github instances just like the .com one. The API path would likely just change from https://api.github.com/ to https://github.corp.net/api/v3, and I guess the calls would just be the same.

Additional context The restriction to github.com is defined here: https://github.com/ossf/scorecard/blob/1f1e05b22ccfac2c389125cdbc5be0bc61a52c1e/repos/repo_url.go#L77

nv35 avatar Jul 05 '21 09:07 nv35

Is your feature request related to a problem? Please describe. I would like to run scorecard for a repository that is hosted on my Github Enterprise instance. I currently can't.

$ scorecard --repo github.corp.net/nv35/myrepo
2021/07/05 09:24:35 unsupported host: github.corp.net

Describe the solution you'd like Allow to use the others github instances just like the .com one. The API path would likely just change from https://api.github.com/ to https://github.corp.net/api/v3, and I guess the calls would just be the same.

Additional context The restriction to github.com is defined here:

https://github.com/ossf/scorecard/blob/1f1e05b22ccfac2c389125cdbc5be0bc61a52c1e/repos/repo_url.go#L77

PR's are welcome!

naveensrinivasan avatar Jul 10 '21 20:07 naveensrinivasan

Thanks for this feedback! This is a great usecase for https://github.com/ossf/scorecard/issues/462. We are still in the process of factoring out all github.com dependencies into RepoClient. Once we have this refactoring in place, it should be easy to use enterprise APIs instead of the regular one.

azeemshaikh38 avatar Jul 12 '21 20:07 azeemshaikh38