From 1316f5179570e36a82e661ab28b787701abe01e9 Mon Sep 17 00:00:00 2001 From: lishengbao Date: Sun, 29 Sep 2024 19:38:51 +0800 Subject: [PATCH 1/2] tmp delete build-doc-checker,api-doc-checker Signed-off-by: lishengbao --- app/services/tpc_software_metric_server.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/services/tpc_software_metric_server.rb b/app/services/tpc_software_metric_server.rb index 12f9e2d6..4d06182b 100644 --- a/app/services/tpc_software_metric_server.rb +++ b/app/services/tpc_software_metric_server.rb @@ -44,8 +44,10 @@ def analyze_metric_by_tpc_service(report_id, report_metric_id, report_type) when Report_Type_Selection commands = %w[osv-scanner scancode binary-checker sonar-scanner dependency-checker] when Report_Type_Graduation + # commands = %w[scancode sonar-scanner binary-checker osv-scanner release-checker readme-checker + # maintainers-checker build-doc-checker api-doc-checker readme-opensource-checker] commands = %w[scancode sonar-scanner binary-checker osv-scanner release-checker readme-checker - maintainers-checker build-doc-checker api-doc-checker readme-opensource-checker] + maintainers-checker readme-opensource-checker] end payload = { commands: commands, From 53eb2e6eed99ae1797e7626c4e5ab8cef9473cde Mon Sep 17 00:00:00 2001 From: lishengbao Date: Sun, 29 Sep 2024 19:40:40 +0800 Subject: [PATCH 2/2] Fix graduation security_binary_artifact_detail metric Signed-off-by: lishengbao --- app/models/tpc_software_report_metric.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/tpc_software_report_metric.rb b/app/models/tpc_software_report_metric.rb index ae0a2ac6..326c47ad 100644 --- a/app/models/tpc_software_report_metric.rb +++ b/app/models/tpc_software_report_metric.rb @@ -331,13 +331,13 @@ def self.get_security_binary_artifact(binary_checker_result) end raw_data = { - "binary_file_list": (binary_checker_result.dig("binary_archive_list") || []).take(30), - "binary_archive_list": (binary_checker_result.dig("binary_archive_list") || []).take(30), + "binary_file_list": (binary_checker_result.dig("binary_archive_list") || []).take(5), + "binary_archive_list": (binary_checker_result.dig("binary_archive_list") || []).take(5), } { security_binary_artifact: score, - security_binary_artifact_detail: binary_archive_list.take(5).to_json, + security_binary_artifact_detail: binary_archive_list.take(1).to_json, security_binary_artifact_raw: raw_data.to_json } end