@@ -89,7 +89,7 @@ func SetupOtelp(ctx context.Context, otelpURL, version string) (shutdown func(co
89
89
}
90
90
91
91
func createReportDir (dir string ) (string , error ) {
92
- err := os .MkdirAll (dir , 0o755 )
92
+ err := os .MkdirAll (dir , 0o750 )
93
93
if err != nil {
94
94
return "" , err
95
95
}
@@ -102,7 +102,7 @@ func createReportDir(dir string) (string, error) {
102
102
path += "_" + strconv .Itoa (i )
103
103
}
104
104
if _ , err := os .Stat (path ); os .IsNotExist (err ) {
105
- err := os .Mkdir (path , 0o755 )
105
+ err := os .Mkdir (path , 0o750 )
106
106
if err != nil {
107
107
return "" , err
108
108
}
@@ -137,7 +137,7 @@ func SetupStdout(ctx context.Context, debugDir, version string) (shutdown func(c
137
137
if err != nil {
138
138
return nil , err
139
139
}
140
- logFile , err := os .Create (filepath .Join (dir , "logs.json" ))
140
+ logFile , err := os .Create (filepath .Join (dir , "logs.json" )) //nolint:gosec // Safe file path construction in a controlled directory
141
141
if err != nil {
142
142
return nil , err
143
143
}
@@ -160,7 +160,7 @@ func SetupStdout(ctx context.Context, debugDir, version string) (shutdown func(c
160
160
log .WithResource (resource ),
161
161
)
162
162
global .SetLoggerProvider (logProvider )
163
- traceFile , err := os .Create (filepath .Join (dir , "traces.json" ))
163
+ traceFile , err := os .Create (filepath .Join (dir , "traces.json" )) //nolint:gosec // Safe file path construction in a controlled directory
164
164
if err != nil {
165
165
handleErr (err )
166
166
return
@@ -182,7 +182,7 @@ func SetupStdout(ctx context.Context, debugDir, version string) (shutdown func(c
182
182
trace .WithResource (resource ),
183
183
)
184
184
otel .SetTracerProvider (traceProvider )
185
- metricFile , err := os .Create (filepath .Join (dir , "metrics.json" ))
185
+ metricFile , err := os .Create (filepath .Join (dir , "metrics.json" )) //nolint:gosec // Safe file path construction in a controlled directory
186
186
if err != nil {
187
187
handleErr (err )
188
188
return
0 commit comments