From d759e4f401ff55722519b44cde63b934a2168d95 Mon Sep 17 00:00:00 2001 From: bradAGI <46579244+bradAGI@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:02:54 -0400 Subject: [PATCH] refactor: drop the two scan timestamps nothing reads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SCAN_START and SCAN_END are assigned around the scan and never referenced again — not in the report, the summary, trustabl.env, or either integration wrapper. Dead since the port from the GitLab component, where the surrounding code did consume them. Beyond the noise, they read as an intent the script does not deliver: a reviewer sees two timestamps bracketing the scan and reasonably expects a duration somewhere in the output. There is none. Removing them rather than wiring them up, since neither integration has anywhere to put a duration today. If one gains a use for it, one line brings it back. --- scan/trustabl-scan.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/scan/trustabl-scan.sh b/scan/trustabl-scan.sh index caa6314..f6d2d69 100644 --- a/scan/trustabl-scan.sh +++ b/scan/trustabl-scan.sh @@ -109,7 +109,6 @@ export PATH="$DEST:$PATH" # ---- scan ---- set +e -SCAN_START=$(date -u +%Y-%m-%dT%H:%M:%S) # Resolve the repo label (report box + summary). # Priority: explicit GitHub URL target -> target's git remote -> CodeBuild repo. @@ -139,7 +138,6 @@ NATIVE_CODE=$? # Run 2: JSON (drives thresholds, log summary, dotenv). trustabl "${BASE_ARGS[@]}" --format json > "$JSON_FILE" || true -SCAN_END=$(date -u +%Y-%m-%dT%H:%M:%S) # trustabl's overall_score is a float in [0.0, 1.0]; scale to [0,100] ints. RAW_SCORE=$(jq -r '.overall_score // 1' "$JSON_FILE")