diff --git a/convert/from_curl.go b/convert/from_curl.go index 50b4630d..8daa46ea 100644 --- a/convert/from_curl.go +++ b/convert/from_curl.go @@ -119,7 +119,7 @@ func LoadCurlCase(path string) (*hrp.TestCaseDef, error) { } func readFileLines(path string) ([]string, error) { - file, err := os.OpenFile(path, os.O_RDONLY, 0o666) + file, err := os.OpenFile(path, os.O_RDONLY, 0o600) if err != nil { log.Error().Err(err).Str("path", path).Msg("open file failed") return nil, err diff --git a/internal/version/VERSION b/internal/version/VERSION index a3a1c043..2bd6b502 100644 --- a/internal/version/VERSION +++ b/internal/version/VERSION @@ -1 +1 @@ -v5.0.0-beta-2504282106 +v5.0.0-beta-2504282109 diff --git a/pkg/gadb/device.go b/pkg/gadb/device.go index 1f6a259c..f4215a58 100644 --- a/pkg/gadb/device.go +++ b/pkg/gadb/device.go @@ -536,7 +536,7 @@ func (d *Device) List(remotePath string) (devFileInfos []DeviceFileInfo, err err } func (d *Device) PushFile(localPath, remotePath string, modification ...time.Time) (err error) { - localFile, err := os.OpenFile(localPath, os.O_RDONLY, 0o666) + localFile, err := os.OpenFile(localPath, os.O_RDONLY, 0o600) if err != nil { return err } @@ -645,7 +645,7 @@ func (d *Device) installViaABBExec(apk io.ReadSeeker, args ...string) (raw []byt } func (d *Device) InstallAPK(apkPath string, args ...string) (string, error) { - apkFile, err := os.OpenFile(apkPath, os.O_RDONLY, 0o666) + apkFile, err := os.OpenFile(apkPath, os.O_RDONLY, 0o600) if err != nil { return "", errors.Wrap(err, fmt.Sprintf("open apk file %s failed", apkPath)) } diff --git a/summary.go b/summary.go index 0cac3117..ab6892a7 100644 --- a/summary.go +++ b/summary.go @@ -95,7 +95,7 @@ func (s *Summary) GenHTMLReport() error { } reportPath := filepath.Join(reportsDir, "report.html") - file, err := os.OpenFile(reportPath, os.O_WRONLY|os.O_CREATE, 0o666) + file, err := os.OpenFile(reportPath, os.O_WRONLY|os.O_CREATE, 0o600) if err != nil { log.Error().Err(err).Msg("open file failed") return err diff --git a/uixt/android_driver_adb.go b/uixt/android_driver_adb.go index e7b77319..34cab417 100644 --- a/uixt/android_driver_adb.go +++ b/uixt/android_driver_adb.go @@ -701,7 +701,7 @@ func (ad *ADBDriver) StopCaptureLog() (result interface{}, err error) { return pointRes, nil } - reader, err := os.OpenFile(files[0], os.O_RDONLY, 0o666) + reader, err := os.OpenFile(files[0], os.O_RDONLY, 0o600) if err != nil { log.Info().Msg("open File error") return pointRes, nil diff --git a/uixt/ios_driver_wda.go b/uixt/ios_driver_wda.go index 805829be..e3a96c61 100644 --- a/uixt/ios_driver_wda.go +++ b/uixt/ios_driver_wda.go @@ -970,7 +970,7 @@ func (wd *WDADriver) StartCaptureLog(identifier ...string) error { func (wd *WDADriver) PushImage(localPath string) error { log.Info().Str("localPath", localPath).Msg("WDADriver.PushImage") - localFile, err := os.OpenFile(localPath, os.O_RDONLY, 0o666) + localFile, err := os.OpenFile(localPath, os.O_RDONLY, 0o600) if err != nil { return err }