-
Notifications
You must be signed in to change notification settings - Fork 6
OpenSSF Scorecard plugin expansion + RSFC plugin docker image update and new indicator #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ | |
| class OpenSSFScorecard(IndicatorPlugin): | ||
| name = "OpenSSF Scorecard" | ||
| id = "https://github.com/ossf/scorecard" | ||
| version = "v5.1.1" | ||
| version = "v5.4.0" | ||
| indicators = [ | ||
| "has_ci_tests", | ||
| "human_code_review_requirement", | ||
|
|
@@ -144,3 +144,103 @@ def has_published_package(self, url, branch_hash_or_tag): | |
| evidence=evidence, | ||
| success=success, | ||
| ) | ||
|
|
||
| def project_is_active(self, url, branch_hash_or_tag): | ||
| results = self.execute(url, branch_hash_or_tag) | ||
| score = self.get_score(results, "Maintained") | ||
| if score >= 5: | ||
| output = "true" | ||
| evidence = f"Maintained score is 5 or higher ({score})." | ||
| success = True | ||
| else: | ||
| output = "false" | ||
| evidence = f"Maintained score is less than 5 ({score})." | ||
| success = False | ||
|
|
||
| return CheckResult( | ||
| process="Calculates the Maintained score.", | ||
| status_id="schema:CompletedActionStatus", | ||
| output=output, | ||
| evidence=evidence, | ||
| success=success, | ||
| ) | ||
|
|
||
| def static_analysis_common_vulnerabilities(self, url, branch_hash_or_tag): | ||
| results = self.execute(url, branch_hash_or_tag) | ||
| score = self.get_score(results, "SAST") | ||
| if score >= 5: | ||
| output = "true" | ||
| evidence = f"SAST score is 5 or higher ({score})." | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please find out what the 5/10 means here. Evidence should clarify it. |
||
| success = True | ||
| else: | ||
| output = "false" | ||
| evidence = f"SAST score is less than 5 ({score})." | ||
| success = False | ||
|
|
||
| return CheckResult( | ||
| process="Calculates the SAST score.", | ||
| status_id="schema:CompletedActionStatus", | ||
| output=output, | ||
| evidence=evidence, | ||
| success=success, | ||
| ) | ||
|
|
||
| def dependency_management(self, url, branch_hash_or_tag): | ||
| results = self.execute(url, branch_hash_or_tag) | ||
| score = self.get_score(results, "Dependency-Update-Tool") | ||
| if score >= 5: | ||
| output = "true" | ||
| evidence = f"Dependency-Update-Tool score is 5 or higher ({score})." | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above |
||
| success = True | ||
| else: | ||
| output = "false" | ||
| evidence = f"Dependency-Update-Tool score is less than 5 ({score})." | ||
| success = False | ||
|
|
||
| return CheckResult( | ||
| process="Calculates the Dependency-Update-Tool score.", | ||
| status_id="schema:CompletedActionStatus", | ||
| output=output, | ||
| evidence=evidence, | ||
| success=success, | ||
| ) | ||
|
|
||
| def no_critical_vulnerability(self, url, branch_hash_or_tag): | ||
| results = self.execute(url, branch_hash_or_tag) | ||
| score = self.get_score(results, "Vulnerabilities") | ||
| if score >= 5: | ||
| output = "true" | ||
| evidence = f"Vulnerabilities score is 5 or higher ({score})." | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above |
||
| success = True | ||
| else: | ||
| output = "false" | ||
| evidence = f"Vulnerabilities score is less than 5 ({score})." | ||
| success = False | ||
|
|
||
| return CheckResult( | ||
| process="Calculates the Vulnerabilities score.", | ||
| status_id="schema:CompletedActionStatus", | ||
| output=output, | ||
| evidence=evidence, | ||
| success=success, | ||
| ) | ||
|
|
||
| def uses_fuzzing(self, url, branch_hash_or_tag): | ||
| results = self.execute(url, branch_hash_or_tag) | ||
| score = self.get_score(results, "Fuzzing") | ||
| if score >= 5: | ||
| output = "true" | ||
| evidence = f"Fuzzing score is 5 or higher ({score})." | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. |
||
| success = True | ||
| else: | ||
| output = "false" | ||
| evidence = f"Fuzzing score is less than 5 ({score})." | ||
| success = False | ||
|
|
||
| return CheckResult( | ||
| process="Calculates the Fuzzing score.", | ||
| status_id="schema:CompletedActionStatus", | ||
| output=output, | ||
| evidence=evidence, | ||
| success=success, | ||
| ) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not clarify in the evidence what is being measured.
What does a score 5 mean? We should do a little better, I think.
Here, I think that if the project receives a commit in the last 90 days it receives 1/10.
We can lower the acceptance a bit, with an explanation in evidence.