Skip to content

Commit

Permalink
fix gosec issues
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickcping committed Dec 29, 2023
1 parent f02123d commit 02642cc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/acctest/testdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
1 change: 1 addition & 0 deletions internal/service/davinci/data_source_applications.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 02642cc

Please sign in to comment.