diff --git a/internal/acctest/testdata.go b/internal/acctest/testdata.go index 5b0eb0ad..a1f8197a 100644 --- a/internal/acctest/testdata.go +++ b/internal/acctest/testdata.go @@ -214,7 +214,7 @@ func readFlowJsonFile(path string, resourceName string) string { if !ok { panic("could not get current file") } - flowByte, err := os.ReadFile(filepath.Join(filepath.Dir(currentPath), path)) + flowByte, err := os.ReadFile(filepath.Join(filepath.Dir(currentPath), filepath.Clean(path))) if err != nil { panic(err) } diff --git a/internal/service/davinci/data_source_applications.go b/internal/service/davinci/data_source_applications.go index c769ced4..fdc48685 100644 --- a/internal/service/davinci/data_source_applications.go +++ b/internal/service/davinci/data_source_applications.go @@ -396,6 +396,7 @@ func dataSourceApplicationsRead(ctx context.Context, d *schema.ResourceData, met apps := make([]interface{}, len(resp)) for i, thisApp := range resp { + thisApp := thisApp // G601 (CWE-118) app, err := flattenApp(&thisApp) if err != nil { return diag.FromErr(err) diff --git a/internal/service/davinci/resource_application_flow_policy.go b/internal/service/davinci/resource_application_flow_policy.go index 3784f620..353ba825 100644 --- a/internal/service/davinci/resource_application_flow_policy.go +++ b/internal/service/davinci/resource_application_flow_policy.go @@ -117,6 +117,7 @@ func resourceApplicationFlowPolicyCreate(ctx context.Context, d *schema.Resource var resAppPolicy *dv.Policy for _, v := range res.Policies { if v.Name == appPolicy.Name { + v := v // G601 (CWE-118) resAppPolicy = &v break }