From 7f915aa45ea91f863c9b54cb60d075dfb71ee487 Mon Sep 17 00:00:00 2001 From: delarea Date: Wed, 27 Sep 2023 10:15:49 +0300 Subject: [PATCH] fix CWE-118 --- xray/utils/resultstable_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xray/utils/resultstable_test.go b/xray/utils/resultstable_test.go index c67ca9ab9..306e0450d 100644 --- a/xray/utils/resultstable_test.go +++ b/xray/utils/resultstable_test.go @@ -711,12 +711,12 @@ func TestShouldDisqualifyEvidence(t *testing.T) { disqualify: false, }, } - for _, tc := range testCases { + for i, tc := range testCases { t.Run(tc.name, func(t *testing.T) { locationObject := &sarif.Location{ PhysicalLocation: &sarif.PhysicalLocation{ ArtifactLocation: &sarif.ArtifactLocation{ - URI: &tc.filePath, + URI: &testCases[i].filePath, }, }, }