From 6d321ea85bd375a194b0bd91db1bda6dfb57b460 Mon Sep 17 00:00:00 2001 From: Utsav Joshi <98454866+utsavjosh1@users.noreply.github.com> Date: Tue, 28 Apr 2026 23:04:27 +0530 Subject: [PATCH] Potential fix for code scanning alert no. 29: Log injection Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- apps/api/src/services/resume.service.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/apps/api/src/services/resume.service.ts b/apps/api/src/services/resume.service.ts index b950241..b7fa8f3 100644 --- a/apps/api/src/services/resume.service.ts +++ b/apps/api/src/services/resume.service.ts @@ -152,14 +152,9 @@ Return ONLY the JSON object, no markdown formatting or explanation.`; ); return updatedResume || resume; - } catch (error) { - // Safe error logging to avoid log injection - console.error( - "Error processing resume:", - error instanceof Error - ? this.sanitizeForLog(error.message) - : "Unknown error", - ); + } catch (_error) { + // Avoid logging user-influenced error content to prevent log injection + console.error("Error processing resume"); // The user can retry analysis later return resume; }