diff --git a/cmd/lattice/cmd.go b/cmd/lattice/cmd.go index d4d1ddf..bc26bef 100644 --- a/cmd/lattice/cmd.go +++ b/cmd/lattice/cmd.go @@ -121,7 +121,7 @@ func command(_ context.Context, opt *option) error { } out := Stdout if opt.output != "" { - f, err := os.OpenFile(opt.output, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0o666) + f, err := os.OpenFile(opt.output, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0o600) if err != nil { return err } diff --git a/kagome_test.go b/kagome_test.go index 12045f2..0872db0 100644 --- a/kagome_test.go +++ b/kagome_test.go @@ -38,7 +38,7 @@ func TestKagomeTokenizerGolden(t *testing.T) { } defer golden.Close() - dump, err := os.OpenFile(dumpText, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0o666) + dump, err := os.OpenFile(dumpText, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0o600) if err != nil { t.Fatalf("unexpected error, %v", err) }