criticality_score icon indicating copy to clipboard operation
criticality_score copied to clipboard

Adds repolist command line parameter

Open lehors opened this issue 2 years ago • 2 comments

The new --repolist parameter takes the name of a file containing a list of repositories to score.

usage: run.py [-h] (--repo REPO | --repolist REPOLIST | --local-file L_FILE) [--format {default,csv,json}] [--params PARAMS [PARAMS ...]]

Gives criticality score for an open source project or a list of projects.

optional arguments: -h, --help show this help message and exit --repo REPO repository url --repolist REPOLIST listfile of repository urls --local-file L_FILE path of a local csv file with repo stats --format {default,csv,json} output format. allowed values are [default, csv, json] --params PARAMS [PARAMS ...] Additional parameters in form ::<max_threshold>

This at least partially addresses Issue #97

Signed-off-by: Arnaud J Le Hors [email protected]

lehors avatar Apr 04 '22 12:04 lehors

Hello, how do I use it?

zhl-tcsec avatar May 09 '22 10:05 zhl-tcsec

Hello, how do I use it?

I rebased my PR to the latest on main so you should be able to simply use it by feeding scorecard with a file that contains a list of repositories:

$ cat mylist
https://github.com/ossf/criticality_score
https://github.com/ossf/scorecard

$ criticality_score --repolist mylist --format csv
name,url,language,description,created_since,updated_since,contributor_count,watchers_count,org_count,commit_frequency,recent_releases_count,updated_issues_count,closed_issues_count,comment_frequency,dependents_count,criticality_score
criticality_score,https://github.com/ossf/criticality_score,Python,Gives criticality score for an open source project,18,0,14,1034,6,0.2,3,18,8,0.6,0,0.32581
scorecard,https://github.com/ossf/scorecard,Go,Security Scorecards - Security health metrics for Open Source,19,0,60,2608,5,18.1,15,326,242,4.6,0,0.5257

lehors avatar May 09 '22 16:05 lehors