From d7ddc29478ee25c2837384bafbe4963cab08383e Mon Sep 17 00:00:00 2001 From: Brigs Date: Mon, 6 Jul 2026 15:50:09 -0400 Subject: [PATCH 1/2] sysShutdown: shorten per-row Source File paths to extraction-relative Follow-up to #345: wrap the file_found copies placed in the Source File column with Context.get_relative_path. Audit of all RLEAPP artifacts found only this file as a true positive (google_health emits basenames; kik is deferred to the open migration in #287). --- scripts/artifacts/sysShutdown.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/artifacts/sysShutdown.py b/scripts/artifacts/sysShutdown.py index 3a45b36..0fbfc0d 100644 --- a/scripts/artifacts/sysShutdown.py +++ b/scripts/artifacts/sysShutdown.py @@ -19,6 +19,7 @@ from scripts.artifact_report import ArtifactHtmlReport from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows, convert_ts_int_to_utc, convert_utc_human_to_timezone +from scripts.context import Context def get_sysShutdown(files_found, report_folder, seeker, wrap_text): @@ -46,11 +47,11 @@ def get_sysShutdown(files_found, report_folder, seeker, wrap_text): timestamp = int(sigterm_match.group(1)) #reboot_time = datetime.utcfromtimestamp(timestamp).strftime('%Y-%m-%d %H:%M:%S') reboot_time = convert_utc_human_to_timezone(convert_ts_int_to_utc(timestamp),'UTC') - data_list_shutdown_reboot.append((reboot_time,reboots,file_found)) + data_list_shutdown_reboot.append((reboot_time,reboots,Context.get_relative_path(file_found))) reboots += 1 for pid, path in entries: - data_list_shutdown_log.append((reboot_time,entry_num,pid,path,file_found)) + data_list_shutdown_log.append((reboot_time,entry_num,pid,path,Context.get_relative_path(file_found))) entry_num += 1 entries = [] From 2e442f7aeafbd54904d750259453554fbd25c33e Mon Sep 17 00:00:00 2001 From: Brigs Date: Mon, 6 Jul 2026 15:55:40 -0400 Subject: [PATCH 2/2] sysShutdown: clear pre-existing lint debt (8.04 -> 10.00) Unused imports removed, constant f-strings fixed, loop-variable leak guarded with an initializer, legacy-signature args pragma'd. Note: this artifact has v2 metadata but a legacy self-reporting body (no artifact_processor, no LAVA output) - conversion flagged separately. --- scripts/artifacts/sysShutdown.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/artifacts/sysShutdown.py b/scripts/artifacts/sysShutdown.py index 0fbfc0d..9fb0706 100644 --- a/scripts/artifacts/sysShutdown.py +++ b/scripts/artifacts/sysShutdown.py @@ -13,18 +13,17 @@ } } -from datetime import datetime -import os import re from scripts.artifact_report import ArtifactHtmlReport -from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows, convert_ts_int_to_utc, convert_utc_human_to_timezone +from scripts.ilapfuncs import logfunc, tsv, timeline, convert_ts_int_to_utc, convert_utc_human_to_timezone from scripts.context import Context -def get_sysShutdown(files_found, report_folder, seeker, wrap_text): +def get_sysShutdown(files_found, report_folder, seeker, wrap_text): # pylint: disable=unused-argument data_list_shutdown_log = [] data_list_shutdown_reboot = [] + file_found = '' for file_found in files_found: file_found = str(file_found) @@ -66,10 +65,10 @@ def get_sysShutdown(files_found, report_folder, seeker, wrap_text): report.write_artifact_data_table(data_headers, data_list_shutdown_log, file_found) report.end_artifact_report() - tsvname = f'Sysdiagnose - Shutdown Log Processes' + tsvname = 'Sysdiagnose - Shutdown Log Processes' tsv(report_folder, data_headers, data_list_shutdown_log, tsvname) - tlactivity = f'Sysdiagnose - Shutdown Log Processes' + tlactivity = 'Sysdiagnose - Shutdown Log Processes' timeline(report_folder, tlactivity, data_list_shutdown_log, data_headers) else: logfunc('No Sysdiagnose - Shutdown Log Processes data available') @@ -84,10 +83,10 @@ def get_sysShutdown(files_found, report_folder, seeker, wrap_text): report.write_artifact_data_table(data_headers, data_list_shutdown_reboot, file_found) report.end_artifact_report() - tsvname = f'Sysdiagnose - Shutdown Log Reboots' + tsvname = 'Sysdiagnose - Shutdown Log Reboots' tsv(report_folder, data_headers, data_list_shutdown_reboot, tsvname) - tlactivity = f'Sysdiagnose - Shutdown Log Reboots' + tlactivity = 'Sysdiagnose - Shutdown Log Reboots' timeline(report_folder, tlactivity, data_list_shutdown_reboot, data_headers) else: logfunc('No Sysdiagnose - Shutdown Log Reboots data available')